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

mouseDownHandler is not attached to listener #238

Open
7flash opened this issue Jul 24, 2022 · 2 comments
Open

mouseDownHandler is not attached to listener #238

7flash opened this issue Jul 24, 2022 · 2 comments

Comments

@7flash
Copy link

7flash commented Jul 24, 2022

No description provided.

@7flash
Copy link
Author

7flash commented Jul 24, 2022

@ricardo-reis-1970
Copy link

Hi @7flash.

I literally just came here looking for the same as you. You are right: the mouseDownHandler is unattached, but in the article page the demo works, right?

The answer is in this repo (or in the DevTools of the article page). If you visit the demo file in https://github.com/phuocng/html-dom/blob/master/assets/demo/drag-to-scroll/index.html, you'll find the missing bit right at the end of the <script>:

                // Attach the handler
                ele.addEventListener('mousedown', mouseDownHandler);

Yes, I agree that the article should highlight this instead of leaving it to be found by the stubborn.

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

2 participants