{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/14","labels_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/14/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/14/events","html_url":"https://github.com/PolymerElements/iron-overlay-behavior/issues/14","id":83751699,"number":14,"title":"Opening from on-tap causes immediate close.","user":{"login":"wintersandroid","id":2851384,"avatar_url":"https://avatars.githubusercontent.com/u/2851384?v=3","gravatar_id":"","url":"https://api.github.com/users/wintersandroid","html_url":"https://github.com/wintersandroid","followers_url":"https://api.github.com/users/wintersandroid/followers","following_url":"https://api.github.com/users/wintersandroid/following{/other_user}","gists_url":"https://api.github.com/users/wintersandroid/gists{/gist_id}","starred_url":"https://api.github.com/users/wintersandroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wintersandroid/subscriptions","organizations_url":"https://api.github.com/users/wintersandroid/orgs","repos_url":"https://api.github.com/users/wintersandroid/repos","events_url":"https://api.github.com/users/wintersandroid/events{/privacy}","received_events_url":"https://api.github.com/users/wintersandroid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-01T23:57:31Z","updated_at":"2015-06-06T07:25:55Z","closed_at":null,"body":"Basic scenario, have an item, which within its on-tap a non-modal paper-dialog, the overlay flashes up (sometimes slow enough to see) and then closes.\r\n\r\nUsing on-click it will appear, seems the handling of on-tap causes two events.\r\n\r\n```\r\n  <paper-item id=\"master\" on-tap=\"tapMasterItem\">{{currentLabel}}</paper-item>\r\n    <paper-dialog id=\"menuDialog\" with-backdrop=\"false\">\r\n      <paper-dialog-scrollable>\r\n        <paper-menu selected=\"{{currentValue}}\">\r\n          <template as=\"dataitem\" is=\"dom-repeat\" items=\"{{items}}\">\r\n            <paper-item id=\"{{getValue(dataitem)}}\" >{{getLabel(dataitem)}}</paper-item>\r\n          </template>\r\n        </paper-menu>\r\n      </paper-dialog-scrollable>\r\n    </paper-dialog>\r\n\r\n    tapMasterItem: function(){\r\n      if(!this.$.menuDialog.opened){\r\n        this.$.menuDialog.open();\r\n      }\r\n    },\r\n```"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/comments/109543279","html_url":"https://github.com/PolymerElements/iron-overlay-behavior/issues/14#issuecomment-109543279","issue_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/14","id":109543279,"user":{"login":"himu62","id":5198225,"avatar_url":"https://avatars.githubusercontent.com/u/5198225?v=3","gravatar_id":"","url":"https://api.github.com/users/himu62","html_url":"https://github.com/himu62","followers_url":"https://api.github.com/users/himu62/followers","following_url":"https://api.github.com/users/himu62/following{/other_user}","gists_url":"https://api.github.com/users/himu62/gists{/gist_id}","starred_url":"https://api.github.com/users/himu62/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himu62/subscriptions","organizations_url":"https://api.github.com/users/himu62/orgs","repos_url":"https://api.github.com/users/himu62/repos","events_url":"https://api.github.com/users/himu62/events{/privacy}","received_events_url":"https://api.github.com/users/himu62/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T07:25:55Z","updated_at":"2015-06-06T07:25:55Z","body":"I had the same problem, and resolved by modifying the code in 'iron-overlay-behavior.html'.\r\n\r\noriginal @ lines 282-283\r\n```js\r\nthis._toggleListener(this.opened, document, 'click', this._boundOnCaptureClick, true);\r\nthis._toggleListener(this.opened, document, 'keydown', this._boundOnCaptureKeydown, true);\r\n```\r\n\r\nfixed\r\n```js\r\nthis._toggleListener(!this.opened, document, 'click', this._boundOnCaptureClick, true);\r\nthis._toggleListener(!this.opened, document, 'keydown', this._boundOnCaptureKeydown, true);\r\n```\r\n\r\nhttp://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-behavior.html#L282-283\r\n"}}