зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset ed389b1ea7da (bug 1532397) for debugger failure CLOSED TREE
This commit is contained in:
Родитель
94cb1d9dcd
Коммит
edd8d7fc40
|
@ -50,14 +50,10 @@ function inPopup(e) {
|
||||||
|
|
||||||
function getElementFromPos(pos: DOMRect) {
|
function getElementFromPos(pos: DOMRect) {
|
||||||
// $FlowIgnore
|
// $FlowIgnore
|
||||||
// We need to use element*s*AtPoint because the tooltip overlays
|
return document.elementFromPoint(
|
||||||
// the token and thus an undesirable element may be returned
|
|
||||||
const elementsAtPoint = [...document.elementsFromPoint(
|
|
||||||
pos.x + pos.width / 2,
|
pos.x + pos.width / 2,
|
||||||
pos.y + pos.height / 2
|
pos.y + pos.height / 2
|
||||||
)];
|
);
|
||||||
|
|
||||||
return elementsAtPoint.find(el => el.className.startsWith("cm-"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Preview extends PureComponent<Props, State> {
|
class Preview extends PureComponent<Props, State> {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче