manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
155 stars 49 forks source link

paper-tab widget not selectable under Chrome 44 #48

Closed petearvanitis closed 8 years ago

petearvanitis commented 9 years ago

Using widgets, I'm noticing that if you set the selected attribute the tab is not always selected by default. In addition, clicking on a tab won't select it.

This is my simple test case:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:pw='urn:import:com.vaadin.polymer.paper.widget'

<g:HTMLPanel>
    <pw:PaperTabs selected="1">
        <pw:PaperTab>Tab 1</pw:PaperTab>
        <pw:PaperTab>Tab 2</pw:PaperTab>
        <pw:PaperTab>Tab 3</pw:PaperTab>
    </pw:PaperTabs>
</g:HTMLPanel>

/ui:UiBinder

tabexample1

This is under chrome 44 using 1.0.2.0-alpha3. I don't know if this issue appears in earlier versions of chrome or not.

By adding click handlers, I am seeing the click event fire for the PaperTabs and PaperTab widget, and the value of PaperTab.getSelected() does change. However, the bar does not move and the text does not change to the highlighted state. In addition, the iron-select event is not firing in this case either.

If I refresh the widget version of the page enough times, the line does appear and it becomes selectable (maybe 1 time out of 10), but then disappears again on a subsequent refresh.

Under firefox and IE, this does not seem to be an issue, it appears to work 100% of the time (but the bar does take a while to move, on the order of 2-3 seconds).

if I forgo the Widget approach and use the Element approach instead, it appears to work fine under Chrome 44. Also, if I use the Element approach on Chrome 44, the tab seems to function normally (events are fired, the bar moves, etc). I think this rules out the issue being w/ the base Polymer code under Chrome 44.

tabexample2

manolo commented 8 years ago

Yes we have experimented this issue as well, sometimes using timers fixes the issue but not sure about what causes the problem.

manolo commented 8 years ago

Fixed