Skip to content

Commit

Permalink
Check if event is default prevented when loseFocus (click) is triggered.
Browse files Browse the repository at this point in the history
  • Loading branch information
KimGressens committed Jun 2, 2015
1 parent d2cdc6e commit af79c14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/popup.js
Expand Up @@ -8,6 +8,10 @@ angular.module('rt.popup', [])
var padding = 10;

function loseFocus(e) {
if (e.isDefaultPrevented()) {
mouseDownInsidePopup = null;
return;
}
if ( (mouseDownInsidePopup === null || mouseDownInsidePopup === false) && openedPopup && !$.contains(openedPopup.el[0], e.target)) {
mouseDownInsidePopup = null;
hidePopup();
Expand Down

0 comments on commit af79c14

Please sign in to comment.