Skip to content

Commit 51a1e7d

Browse files
committed
Reposition hidden textarea to work around Chrome IME issue
Chrome would show the IME widget too high because it noticed the textarea was cut off by the wrapping DIV. Issue codemirror#4095
1 parent 84dc2d0 commit 51a1e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@
12211221
};
12221222

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

0 commit comments

Comments
 (0)