MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / hiddenTextarea

Function hiddenTextarea

static/plugins/codemirror/codemirror.js:8247–8260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8245 }
8246
8247 function hiddenTextarea() {
8248 var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");
8249 var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
8250 // The textarea is kept positioned near the cursor to prevent the
8251 // fact that it'll be scrolled into view on input from scrolling
8252 // our fake cursor out of view. On webkit, when wrap=off, paste is
8253 // very slow. So make the area wide instead.
8254 if (webkit) { te.style.width = "1000px"; }
8255 else { te.setAttribute("wrap", "off"); }
8256 // If border: 0; -- iOS fails to open keyboard (issue #1287)
8257 if (ios) { te.style.border = "1px solid black"; }
8258 disableBrowserMagic(te);
8259 return div
8260 }
8261
8262 // The publicly visible API. Note that methodOp(f) means
8263 // 'wrap f in an operation, performed on its `this` parameter'.

Callers 2

onCopyCutFunction · 0.85
codemirror.jsFile · 0.85

Calls 2

disableBrowserMagicFunction · 0.85
eltFunction · 0.70

Tested by

no test coverage detected