MCPcopy Create free account
hub / github.com/TruthHun/BookStack / hiddenTextarea

Function hiddenTextarea

static/mergely/lib/codemirror.js:1219–1232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1217 };
1218
1219 function hiddenTextarea() {
1220 var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
1221 var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
1222 // The textarea is kept positioned near the cursor to prevent the
1223 // fact that it'll be scrolled into view on input from scrolling
1224 // our fake cursor out of view. On webkit, when wrap=off, paste is
1225 // very slow. So make the area wide instead.
1226 if (webkit) te.style.width = "1000px";
1227 else te.setAttribute("wrap", "off");
1228 // If border: 0; -- iOS fails to open keyboard (issue #1287)
1229 if (ios) te.style.border = "1px solid black";
1230 disableBrowserMagic(te);
1231 return div;
1232 }
1233
1234 TextareaInput.prototype = copyObj({
1235 init: function(display) {

Callers 2

codemirror.jsFile · 0.70
onCopyCutFunction · 0.70

Calls 3

eltFunction · 0.70
disableBrowserMagicFunction · 0.70
setAttributeMethod · 0.45

Tested by

no test coverage detected