2
votes

I've recently updated polymer and components, and a weird thing appears.

I have paper-dialog element, and inside, on the left a paper-menu item with multiple paper-item. On the right, a simple div with some content. When clicking on a paper-item, the content of the div will change.

Since the update, when clicking on a paper-item element, the dialog will automatically close.

After searching, it appears that if I remove the paper-menu element and only left the multiple paper-item, the problem will no longer occurs. After looking inside the iron-menu-behavior, I found a new function (an override of _activateHandler), which, when commented, will kept previous functionning without closing the dialog.

I keep searching to find any solution, but anyone encountered the same problem?

For information :

<paper-dialog id="dialog" with-backdrop>
 <div id="content"></div>
</paper-dialog>

And inside my div is added this :

  <div class="content">

    <div class="list">
      <paper-menu>
        <template is="dom-repeat" items="{{menu}}">
          <paper-item on-click="_onCategorySelection">
            <iron-icon icon="{{item.icon}}" class="icon"></iron-icon>
            <span class="text">{{item.text}}</span>
          </paper-item>
        </template>
      </paper-menu>
    </div>

    <div id="listContent">
      <div class="noContent" hidden$="{{content}}">
        <div class="noContentText">Pas de catégorie séléctionnée</div>
      </div>
      <template is="dom-if" if="{{content}}">
        <div class="withContent">
          <template is="dom-repeat" items="{{content}}" as="widget">
            <badge data="{{widget}}" on-click="_onWidgetSelect"></badge>
          </template>
        </div>
      </template>
    </div>
  </div>

Thanks a lot

1
can you setup a working JSBIN? (s'it te plait! :))Pascal Gula
yes, when I'll be able to reach jsbin ... ERR_CONNECTION_TIMED_OUTuser3197506
@PascalGula always waiting for jsbin and trying some change. If I remove the tap listener on the paper-menu item, the problem will no longer appear. Not sure if it's a good solution or not ...user3197506
yeah JSBIN is down since yesterday... you can use plnkr or jsFiddle as an alternativePascal Gula
@PascalGula here is the JSBin ! jsbin.com/jufuxotawu/edit?html,console,output If you comment paper-menu's tag, dialog will no longer closeuser3197506

1 Answers

0
votes

Okay, looking at the problem, is seems to be a known issue: https://github.com/PolymerElements/iron-menu-behavior/issues/40 I'll point your JSBIN too there! EDIT: it is yours! :)