Skip to content

Commit

Permalink
Reposition hidden textarea to work around Chrome IME issue
Browse files Browse the repository at this point in the history
Chrome would show the IME widget too high because it noticed the textarea
was cut off by the wrapping DIV.

Issue #4095
  • Loading branch information
marijnh committed Jul 12, 2016
1 parent 84dc2d0 commit 51a1e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@
};

function hiddenTextarea() {
var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
// The textarea is kept positioned near the cursor to prevent the
// fact that it'll be scrolled into view on input from scrolling
Expand Down

0 comments on commit 51a1e7d

Please sign in to comment.