Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Selectmenu: Preserve text selection when interacting with the widget
Fixes #10144
Closes gh-1295
  • Loading branch information
scottgonzalez committed Jul 29, 2014
1 parent 45e13ed commit 749a6a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/selectmenu.js
Expand Up @@ -355,7 +355,14 @@ return $.widget( "ui.selectmenu", {
},

_buttonEvents: {

// Prevent text selection from being reset when interacting with the selectmenu (#10144)
mousedown: function( event ) {
event.preventDefault();
},

click: "_toggle",

keydown: function( event ) {
var preventDefault = true;
switch ( event.keyCode ) {
Expand Down

0 comments on commit 749a6a5

Please sign in to comment.