pickr icon indicating copy to clipboard operation
pickr copied to clipboard

changestop event not fired if mouse enters iframe

Open notrealdev opened this issue 5 years ago • 6 comments

When click and hold then move the pointer to red area, changestop event not fire. Can you check it?

My image: Imgur

My video: https://youtu.be/xqpt3gJ2gaQ

notrealdev avatar Nov 01 '20 13:11 notrealdev

Please stick to the Issue Template. Create a JSFiddle and describe what you've done as detailed as possible and break your issue down to a minimum. This will help me to resolve it as fast as possible.

simonwep avatar Nov 02 '20 16:11 simonwep

Yes, i have create issue on jsbin here: https://jsbin.com/gapilib/edit?html,output

In this case, left content for color picker, right content for iframe map.

Issue:

  • Show the picker
  • When select color, click hold then move the pointer to iframe area then unclick, changestop event not fire. You can see change event still fire when hover mouse on the left content.

notrealdev avatar Nov 03 '20 02:11 notrealdev

Hi @Simonwep can you check it?

notrealdev avatar Nov 05 '20 01:11 notrealdev

Not sure if I can fix that in case the iframe intercepts and prevents propagation of the mouseup event. I'll take a look at it on the weekend.

simonwep avatar Nov 05 '20 06:11 simonwep

Looks like this is rather difficult to fix according to this StackOverflow thread 😕

simonwep avatar Nov 10 '20 19:11 simonwep

I have a PoC on detecting dragend over iframes but it involves applying the CSS property pointer-events: none on iframes while dragging. I'm not sure how much of a valid solution it is by using CSS to bypass JS limitations, but I can tell you that because the current standards of HTMLIFrameElement, it will be very difficult or impossible to make a fix purely on JS. Let me know what you think about it and I'll throw in a PR

christianceb avatar Nov 11 '20 04:11 christianceb