Skip to content

Commit

Permalink
Hide the IME menu when clicked outside
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshtr committed Jul 26, 2013
1 parent 8285856 commit 683e776
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/jquery.ime.selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@
}
} );

// Hide the menu when clicked outside
$( 'html' ).click( $.proxy( this.hide, this ) );

// ... but when clicked on window do not propagate it.
this.$menu.on( 'click', function ( event ) {
event.stopPropagation();
} );

imeselector.$imeSetting.mouseenter( function () {
// We don't want the selector to disappear
// while the user is trying to click it
Expand Down

0 comments on commit 683e776

Please sign in to comment.