зеркало из 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) {
|
||||
// $FlowIgnore
|
||||
// We need to use element*s*AtPoint because the tooltip overlays
|
||||
// the token and thus an undesirable element may be returned
|
||||
const elementsAtPoint = [...document.elementsFromPoint(
|
||||
return document.elementFromPoint(
|
||||
pos.x + pos.width / 2,
|
||||
pos.y + pos.height / 2
|
||||
)];
|
||||
|
||||
return elementsAtPoint.find(el => el.className.startsWith("cm-"));
|
||||
);
|
||||
}
|
||||
|
||||
class Preview extends PureComponent<Props, State> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче