MCPcopy
hub / github.com/csev/py4e / hasBadBidiRects

Function hasBadBidiRects

tools/pythonauto/static/codemirrorepl/codemirror.js:7118–7125  ·  view source on GitHub ↗
(measure)

Source from the content-addressed store, hash-verified

7116 // Feature-detect IE's crummy client rect reporting for bidi text
7117 var badBidiRects;
7118 function hasBadBidiRects(measure) {
7119 if (badBidiRects != null) return badBidiRects;
7120 var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
7121 var r0 = range(txt, 0, 1).getBoundingClientRect();
7122 if (r0.left == r0.right) return false;
7123 var r1 = range(txt, 1, 2).getBoundingClientRect();
7124 return badBidiRects = (r1.right - r0.right < 3);
7125 }
7126
7127 // See if "".split is the broken IE version, if so, provide an
7128 // alternative way to split lines.

Callers 1

buildLineContentFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.70
rangeFunction · 0.50

Tested by

no test coverage detected