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

even with pointer capture on full width/height element in iframe, dragging stops working outside of iframe #493

Open
trusktr opened this issue Nov 22, 2023 · 1 comment
Labels

Comments

@trusktr
Copy link

trusktr commented Nov 22, 2023

For example,

  • I have an iframe, with a <body> that is full width and height of the window in the iframe.
  • on pointerdown on the body in the iframe, I capture the pointer
  • pointermove fires while I'm dragging inside the body
  • as soon as I leave the iframe boundary while the pointer is captured, pointermove events stop firing
  • if I let go (pointerup) outside of the iframe, pointerup does not fire, capture is not lost (I am observing a lostpointercapture event)
  • as soon as I hover back inside the iframe, capture is lost

My pointerdown, pointermove, and pointerup handlers all have event.preventDefault() as their first line. Is this what is causing the issue, and is that expected? Or am I seeing a bug?

EDIT: I feel like I may have asked about this before. It's really easy to forget the intricacies of pointer events.

trusktr added a commit to lume/lume that referenced this issue Nov 22, 2023
@mustaqahmed
Copy link
Member

Captured drag behavior across iframe boundary seems undefined in the spec. Is it because hittesting is also not defined anywhere?

@trusktr: I have two questions:

  • Do you see the same behavior in multiple browsers? I believe Chrome has this problem---I didn't try but this related bug convinced me.
  • Do you have a minimal repro in codepen or jsbin etc for testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants