RSSchermer / ember-rl-dropdown

Dropdown components and mixin for Ember.
MIT License
15 stars 12 forks source link

Close dropdowns on 'focusin' event #18

Closed tomasznapieralski closed 8 years ago

tomasznapieralski commented 8 years ago

There is an edge case bug on Firefox which doesn't trigger click event on input when that input has changed placeholder attribute on focus event.

It is hard to describe that is why we have prepared a small demo :) Demo: https://jsfiddle.net/e2s21f05/8/

Run this demo on Google Chrome and Mozilla Firefox to see the difference. Test case #2 has two variants on Firefox:

We fixed that issue with changes made by this PR. We would like to hear your feedback :)

RSSchermer commented 8 years ago

Thank you very much for the detailed explanation and the fix!

The demo is very interesting, the Firefox behavior seems quite insane indeed. I think closing when focussing on an element outside the dropdown is a good fix :+1:

The only thing that's missing I think is unbinding the focusin event in unbindClosingEvents, could you add an unbind call there?

tomasznapieralski commented 8 years ago

Ah, i missed that! Thanks :)

RSSchermer commented 8 years ago

Thanks once again! Merging...

RSSchermer commented 8 years ago

Published as 0.9.0

tomasznapieralski commented 8 years ago

Thank you