Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

delegate: Don't process event for non Element targets. #1166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amanagr
Copy link

@amanagr amanagr commented Apr 19, 2024

In Firefox, event targets can be pseudo elements like text nodes which don't have .closest method. This results in error when delegate tries to handle trigger for a text node target.

In Firefox, event targets can be pseudo elements like `text` nodes
which don't have `.closest` method. This results in error when
delegate tries to handle trigger for a text node target.
@ojaha065
Copy link

We're a seeing this error a lot lately. Would be nice to have this merged and new version released. Sad to see this project abandoned

@timabbott
Copy link

@atomiks any chance you can merge this PR? Even if you don't do a release, it'd be very helpful for us to be able to install a merged upstream commit for get rid of the spammy exception that this fixes.

amanagr added a commit to amanagr/zulip that referenced this pull request Jul 5, 2024
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.

Since atomiks/tippyjs#1166 has no
response from the developer, we decided to apply this patch
ourselves.
amanagr added a commit to amanagr/zulip that referenced this pull request Jul 5, 2024
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.

Since atomiks/tippyjs#1166 has no
response from the developer, we decided to apply this patch
ourselves.
timabbott pushed a commit to zulip/zulip that referenced this pull request Jul 5, 2024
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.

Since atomiks/tippyjs#1166 has no
response from the developer, we decided to apply this patch
ourselves.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants