{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/271","repository_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior","labels_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/271/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/271/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/271/events","html_url":"https://github.com/PolymerElements/iron-overlay-behavior/pull/271","id":304086945,"number":271,"title":"Prevent open again when click on the trigger!","user":{"login":"AliMD","id":697913,"avatar_url":"https://avatars0.githubusercontent.com/u/697913?v=4","gravatar_id":"","url":"https://api.github.com/users/AliMD","html_url":"https://github.com/AliMD","followers_url":"https://api.github.com/users/AliMD/followers","following_url":"https://api.github.com/users/AliMD/following{/other_user}","gists_url":"https://api.github.com/users/AliMD/gists{/gist_id}","starred_url":"https://api.github.com/users/AliMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliMD/subscriptions","organizations_url":"https://api.github.com/users/AliMD/orgs","repos_url":"https://api.github.com/users/AliMD/repos","events_url":"https://api.github.com/users/AliMD/events{/privacy}","received_events_url":"https://api.github.com/users/AliMD/received_events","type":"User","site_admin":false},"labels":[{"id":284939265,"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/labels/cla:%20yes","name":"cla: yes","color":"00ff00","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-10T17:14:47Z","updated_at":"2018-03-13T00:27:17Z","closed_at":"2018-03-13T00:27:17Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/pulls/271","html_url":"https://github.com/PolymerElements/iron-overlay-behavior/pull/271","diff_url":"https://github.com/PolymerElements/iron-overlay-behavior/pull/271.diff","patch_url":"https://github.com/PolymerElements/iron-overlay-behavior/pull/271.patch"},"body":"In `iron-dropdown` element when user click on the trigger when the dropdown is open, dropdown close and after that it open again and use see a flash on dropdown-content\r\n\r\nTo prevent this we need to call `cancel` asynchronous to make a delay.\r\n\r\nBefore this PR I simply try to `if (this.opened) return;` in my trigger function but dropdown closed before trigger event then I forced to make this PR!"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/comments/372506133","html_url":"https://github.com/PolymerElements/iron-overlay-behavior/pull/271#issuecomment-372506133","issue_url":"https://api.github.com/repos/PolymerElements/iron-overlay-behavior/issues/271","id":372506133,"user":{"login":"valdrinkoshi","id":6173664,"avatar_url":"https://avatars3.githubusercontent.com/u/6173664?v=4","gravatar_id":"","url":"https://api.github.com/users/valdrinkoshi","html_url":"https://github.com/valdrinkoshi","followers_url":"https://api.github.com/users/valdrinkoshi/followers","following_url":"https://api.github.com/users/valdrinkoshi/following{/other_user}","gists_url":"https://api.github.com/users/valdrinkoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/valdrinkoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valdrinkoshi/subscriptions","organizations_url":"https://api.github.com/users/valdrinkoshi/orgs","repos_url":"https://api.github.com/users/valdrinkoshi/repos","events_url":"https://api.github.com/users/valdrinkoshi/events{/privacy}","received_events_url":"https://api.github.com/users/valdrinkoshi/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T00:27:17Z","updated_at":"2018-03-13T00:27:17Z","author_association":"MEMBER","body":"Hi @AliMD, you can listen for `iron-overlay-canceled` event, and invoke `event.preventDefault()` to prevent the overlay from closing, e.g. see how `<paper-menu-button>` does it here:\r\n- add listener: https://github.com/PolymerElements/paper-menu-button/blob/99036edd407b885e55f9b4550c71679a3c088b4f/paper-menu-button.html#L132\r\n- call preventDefault: https://github.com/PolymerElements/paper-menu-button/blob/99036edd407b885e55f9b4550c71679a3c088b4f/paper-menu-button.html#L466-L475\r\n\r\n"}}
{"actor":{"display_login":"valdrinkoshi"}}