simonwep / pickr

🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
https://simonwep.github.io/pickr
MIT License
4.29k stars 287 forks source link

changestop event not fired if mouse enters iframe #254

Open notrealdev opened 3 years ago

notrealdev commented 3 years ago

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

simonwep commented 3 years ago

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.

notrealdev commented 3 years ago

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:

notrealdev commented 3 years ago

Hi @Simonwep can you check it?

simonwep commented 3 years ago

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 commented 3 years ago

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

christianceb commented 3 years ago

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