question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dispatchMouseEvent.type mouseWheel support

See original GitHub issue

I think we can implement a mouse.wheel function, which would call dispatchMouseEvent with type mouseWheel

  async wheel(options = {}) {
    await this._client.send('Input.dispatchMouseEvent', {
      type: 'mouseWheel',
      deltaX: options.deltaX,
      deltaY: options.deltaY
    });
  }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
JoelEinbindercommented, Mar 5, 2019

It isn’t enough for us to check the body scroll position. Internal elements could scroll. Scrolls could be captured. They could land in shadow dom or iframes. Trying to figure out when a scroll has finished from JavaScript is going to require many layers of hacks, if it is doable at all.

There have been some patches related to this landing in Chromium. I need to find some cycles to move dispatchMouseEvent to a better code path for wheel events, but right now it’s unfortunately not a high priority for me.

2reactions
mathiasbynenscommented, Jul 7, 2020

It is, and in fact it was contributed recently: #6141 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

dispatchMouseEvent.type mouseWheel support #4119 - GitHub
I think we can implement a mouse.wheel function, which would call dispatchMouseEvent with type mouseWheel async wheel(options = {}) { await ...
Read more >
Input domain - Chrome DevTools Protocol
dispatchMouseEvent #. Dispatches a mouse event to the page. parameters. type: string. Type of the mouse event.
Read more >
Element: mousewheel event - Web APIs | MDN
The obsolete and non-standard mousewheel event is fired asynchronously at an Element to provide updates while a mouse wheel or similar ...
Read more >
input - Go Packages
Package input provides the Chrome DevTools Protocol commands, types, and events for the Input ... func DispatchMouseEvent(typeVal MouseType, x float64, ...
Read more >
clj-chrome-devtools.commands.input - dispatch-key-event
(dispatch-mouse-event {:as params, :keys [type x y modifiers timestamp button ... :delta-x, X delta in CSS pixels for mouse wheel event (default: 0)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found