You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Entering a hex (for example) value and pressing enter doesn't 'save' which is what I'd expect. At the moment this is effectively being cancelled in my scenario as the Grid housing the control closes the Pickr when it receives an 'enter' keydown. Perhaps I'm missing something?
Describe the solution you'd like
Pressing 'Enter' pretty much anywhere in the popup would call 'Save'.
Describe alternatives you've considered
Thinking about looking into blur events to help me, but would rather not go there. This isn't 100% critical but an annoyance. If you are in that area perhaps you could consider this in the future. If it becomes more of an issue I'll raise a PR in the future.
Additional context
I'm using this control as a cell editor in ag-grid so I don't have full control over my world.
The text was updated successfully, but these errors were encountered:
If you have access to the pickr instance you may consider doing it this way:
pickr.on('init',instance=>{// Pickr input elementconst{result}=instance.getRoot().interaction;// Magic happens hereresult.addEventListener('keydown',e=>{if(e.key==='Enter'){instance.applyColor();// "Saves" the colorinstance.hide();// Hides the modal// You may call e.stopImmediatePropagation(); if you want to prevent event-bubbling}},{capture: true}););});
Awesome - I'll try it out. Thanks :-). If you are not thinking of adding this as standard functionality feel free to close this issue, else I'll leave it open to track this, when/if it makes it's way into the component.
First off: Awesome library. Many many thanks!
Is your feature request related to a problem? Please describe.
Entering a hex (for example) value and pressing enter doesn't 'save' which is what I'd expect. At the moment this is effectively being cancelled in my scenario as the Grid housing the control closes the Pickr when it receives an 'enter' keydown. Perhaps I'm missing something?
Describe the solution you'd like
Pressing 'Enter' pretty much anywhere in the popup would call 'Save'.
Describe alternatives you've considered
Thinking about looking into blur events to help me, but would rather not go there. This isn't 100% critical but an annoyance. If you are in that area perhaps you could consider this in the future. If it becomes more of an issue I'll raise a PR in the future.
Additional context
I'm using this control as a cell editor in ag-grid so I don't have full control over my world.
The text was updated successfully, but these errors were encountered: