Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Use mousedown to prevent a focusout firing before click is handled #198

Merged
merged 3 commits into from
Jan 30, 2017

Conversation

dhiemstra
Copy link
Contributor

@dhiemstra dhiemstra commented Jan 27, 2017

When specifying colorSelectors and initializing the plugin directly on an <input> tag the focusout event is triggered which closes the colorpicker and causes the whole colorSelector click handler not to be fired.

This can be fixed to observe the mousedown instead of click.

I've also added a preventDefault() on the click event to make it work smoother within a dropdown / modal because the click now causes the parent dropdown to close.

@itsjavi itsjavi merged commit 74209bf into itsjavi:master Jan 30, 2017
@itsjavi
Copy link
Owner

itsjavi commented Jan 30, 2017

Thanks I will merge it

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

Successfully merging this pull request may close these issues.

2 participants