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

mouse wheel events are not being fired during a drag #8135

Open
1 task
maribethb opened this issue May 16, 2024 · 4 comments
Open
1 task

mouse wheel events are not being fired during a drag #8135

maribethb opened this issue May 16, 2024 · 4 comments
Assignees
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@maribethb
Copy link
Contributor

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

title

this is needed for scroll-options to work

Reproduction steps

  1. Attach this event listener to the playground in core:

     Blockly.browserEvents.conditionalBind(
          workspace.getSvgGroup(),
          'wheel',
          this,
          () => {
            console.log('mouse wheel event');
          });
    
  2. open the console

  3. scroll the mouse wheel, observe the logs

  4. pick up a block to drag it

  5. scroll the mouse wheel, observe the lack of logs

Stack trace

No response

Screenshots

No response

Browsers

No response

@maribethb maribethb added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels May 16, 2024
@maribethb maribethb self-assigned this May 16, 2024
@maribethb
Copy link
Contributor Author

surprisingly, this css change is causing it #7999

@maribethb
Copy link
Contributor Author

The drag layer is not a child element of the workspace.getSvgGroup() element where we were previously attaching the event listener. If the drag layer captures an event, it will be bubbled up, but the svg group won't get it because it's not a parent of that element.

Before the change in 7999, the drag layer wasn't capturing events. After that change, it does capture events (including, apparently, wheel events despite the name of the css property).

So the scroll option plugin should put its event listener directly on the drag layer.

So consider this issue to be that core should provide a getter for the drag layer. for now in scroll-options i can get the layer through query selectors.

@rachel-fenichel rachel-fenichel removed the issue: triage Issues awaiting triage by a Blockly team member label May 17, 2024
@bsampada7
Copy link
Contributor

Can I work on this issue @maribethb?

@BeksOmega
Copy link
Collaborator

Can I work on this issue @maribethb?

Hiya @bsampada7 I don't think we quite know how we want this to work yet. The list of help wanted issues is probably a better place to look for things to work on! Let me know if there's something specific you're interested in and I can try to match you with an issue =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

4 participants