зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1532397 - Fix multiple highlight issues in debugger r=jlast
https://github.com/firefox-devtools/debugger/issues/7954 Differential Revision: https://phabricator.services.mozilla.com/D21989 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d3a1bdd83c
Коммит
f0e5e29f4f
|
@ -50,10 +50,14 @@ function inPopup(e) {
|
|||
|
||||
function getElementFromPos(pos: DOMRect) {
|
||||
// $FlowIgnore
|
||||
return document.elementFromPoint(
|
||||
// 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(
|
||||
pos.x + pos.width / 2,
|
||||
pos.y + pos.height / 2
|
||||
);
|
||||
)];
|
||||
|
||||
return elementsAtPoint.find(el => el.className.startsWith("cm-"));
|
||||
}
|
||||
|
||||
class Preview extends PureComponent<Props, State> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче