Skip to content

Lint tooltip doesn't work when editor is in shadow dom #3039

@forresto

Description

@forresto

Specifically, this logic always hides the lint tooltip after 400ms.

var poll = setInterval(function() {
  if (tooltip) for (var n = node;; n = n.parentNode) {
    if (n == document.body) return;
    if (!n) { hide(); break; }
  }
  if (!tooltip) return clearInterval(poll);
}, 400);

As the for loop travels up the tree, it hits the shadow dom boundary (document fragment), which doesn't have a .parentNode. I can make a reduced case if that helps.

It works for me commenting those lines out, but I'd like to make a fix that takes what this logic is supposed to do into account. What is it there for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions