-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Inline mode trigger click on parent element #243
Comments
Hmm, pickr doesn't do anything on it's one - especially not emitting UI-Events such as clicking stuff. I just checked the source and found nothing related to Maybe you've discovered an edge-case? Would it be possible to break this down in a JSFiddle? |
Sounds really strange since it only happens when inline mode is set to |
@simonwep okay, so I have made a JSFiddle for you, where I have copied the markup from Umbraco, but omitted some angular logic to keep it simple. https://jsfiddle.net/3ukozf89/8/ So inside this "preview" container the Pickr instance is rendered. Umbraco then have an angular click event on this preview container and a separate settings buttons. I have added click events on these with id "preview" and "settings". When Picker has
If I comment out this line the date is not rendered in the output in element with id
So it seems something in Pickr must fire a click on this ancestor element since I would expect it only to trigger when clicking this event. If I comment out the aforementioned line, the datestamp is only rendered when clicking the settings button as expected. |
@bjarnef That's perfect and definitely a (serious and weird) bug, I'll take a look into it! |
Great! Thanks @simonwep |
Great! I've published 1.7.4 which comes with this fix :) |
@simonwep is something missing on npm since it shows the latest version is 1.7.2? |
@bjarnef Ay forgot to actually publish it - it's getting late here, sorry 😅 |
What is the current behavior?
I have used Pickr as a color picker property editor in Umbraco CMS, which seems to work very well.
However on a document type where a property is added it shows a preview of this (Pickr is rendered in background).
When inline mode is false it works as expected. However when inline mode is true it seems to trigger a click event on the parent element after the inline color picker is shown. So after the inline picker is rendered it opens this overlay, which usually only open when clicking the preview area. When inline mode in the Pickr instance is false this doesn't happen, so I am wondering a click event happens after rendering the inline picker?
Your environment:
The text was updated successfully, but these errors were encountered: