You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a result of a recent update to one of the @wordpress packages, we're now seeing these warnings on all PRs:
Text: "[@wordpress/no-global-event-listener] Avoid using (add|remove)EventListener with globals. Use ownerDocument or ownerDocument.defaultView on a node ref instead."
Should be easy to fix simply by doing what the warning says.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
On closer look, it might be best to simply disable the rule in files that are not using React. My interpretation of the new rule is that it's mainly intended to guard against reaching outside the virtual DOM in React contexts. See WordPress/gutenberg#26810
Bug Description
As a result of a recent update to one of the
@wordpress
packages, we're now seeing these warnings on all PRs:Text: "[@wordpress/no-global-event-listener] Avoid using (add|remove)EventListener with globals. Use
ownerDocument
orownerDocument.defaultView
on a node ref instead."Should be easy to fix simply by doing what the warning says.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: