PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

On FF, a disabled menu with a selected item looks wonky #106

Closed notwaldorf closed 8 years ago

notwaldorf commented 8 years ago

Repro steps: http://jsbin.com/jekupi/edit?html,output Wonky:

screen shot 2015-12-14 at 7 26 46 pm
bicknellr commented 8 years ago

I've been looking into this for a bit and Firefox is dropping a change event in iron-input. If you put a debugger before this line, bind-value-changed gets fired twice - first during _ready and second as a result of the iron-selector setting its initial selected value. The first time, everything seems fine, but in the second call to fire, node.dispatchEvent(event) does nothing. The event isn't cancelable yet neither of the event handlers for bind-value-changed are called (including the one which propagates this back up to the paper-input, affecting the label).

In the middle of writing that I finally decided to look at the iron-input bugs and this is totally a dup of PolymerElements/iron-input#47, so PolymerElements/iron-input#69 is probably going to fix this. And, what do you know, this.hasAttribute('disabled') returns false during the first firing of bind-value-changed and true the next.. I'll take this as a lesson to do more digging first..

notwaldorf commented 8 years ago

Yeah, this is happening because dispatchEvent is hosed on FF for disabled items. https://github.com/PolymerElements/iron-input/pull/69 will fix that.

valdrinkoshi commented 8 years ago

This has been fixed with iron-input v1.0.8 🎉

screen shot 2016-06-30 at 1 09 55 am

Can we close this? or should we update bower.json?

notwaldorf commented 8 years ago

I think we can just close it. We don't need to update the bower, i don't think, since we're not using a feature that didn't exist before 1.0.8 -- it just worked poorly before it.