Skip to content

Commit

Permalink
Merge pull request #7 from non-engineer-dev/fix-issue-2
Browse files Browse the repository at this point in the history
Fix suggestion is always at the end of the text (issue #2)
  • Loading branch information
knadh authored Aug 26, 2024
2 parents 2a5cbdc + c475b3e commit 6304665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/floatype.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion floatype.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function floatype(el, options = {}) {

// Update shadow div content up to the cursor position
const cl = "floatype-caret";
shadow.innerHTML = el.value.substring(0, start) + `<span id="${cl}" style="display: inline-block;">${el.value.substring(start)}</span>`;
shadow.innerHTML = el.value.substring(0, start) + `<span id="${cl}" style="display: inline-block;"></span>`;

const m = document.getElementById(cl);
const rect = el.getBoundingClientRect();
Expand Down

0 comments on commit 6304665

Please sign in to comment.