Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web-c: in WheelHandler, event["path"] is always undefined #155

Open
joanise opened this issue Feb 23, 2023 · 0 comments
Open

Web-c: in WheelHandler, event["path"] is always undefined #155

joanise opened this issue Feb 23, 2023 · 0 comments

Comments

@joanise
Copy link
Member

joanise commented Feb 23, 2023

This code does not work:

read-along.tsx function wheelHandler():

      if (
        event["path"][0].classList.contains("sentence__word") ||
        event["path"][0].classList.contains("sentence__container") ||
        event["path"][0].classList.contains("sentence")
      ) {

because event["path"] is always undefined.

Every time I use my mouse's wheel, I get this exception in a read-along on EastCree.org:
image

and this one serving from my own computer:
image

If that logic is sometimes true, then it should be

      if (
        event["path"] && (
        event["path"][0].classList.contains("sentence__word") ||
        event["path"][0].classList.contains("sentence__container") ||
        event["path"][0].classList.contains("sentence")
        )
      ) {

but inspecting the contents of event through console.log(event), I'm not figuring out what this was trying to capture. Maybe event.view or some such?

@joanise joanise changed the title Web-c: in WheelHanlder, event["path"] is always undefined Web-c: in WheelHandler, event["path"] is always undefined Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant