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

PaperTabsBase resize error #94

Closed mtallenca closed 3 years ago

mtallenca commented 8 years ago

PaperTabsBase has the below code. I'm getting a _onResize is not a function error in Chrome. If I comment the fixTabsSelection call out in onAttach, seems to work fine. Is it time to remove the "temporary workaround"?

@Override protected void onAttach() { super.onAttach(); fixTabsSelection((PaperTabsElement)getElement()); }

// A temporary workaround to fix the underline tab issue
// Not a solution.
private native void fixTabsSelection(Element e) /*-{
    @com.vaadin.polymer.Polymer::whenReady(Lcom/vaadin/polymer/elemental/Function;Lcom/google/gwt/dom/client/Element;)(function(){
      setTimeout(function() {
        e._onResize();
      }, 400);
    }, e);
}-*/;