Skip to content

Commit 749a6a5

Browse files
committed
Selectmenu: Preserve text selection when interacting with the widget
Fixes #10144 Closes jquerygh-1295
1 parent 45e13ed commit 749a6a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/selectmenu.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,14 @@ return $.widget( "ui.selectmenu", {
355355
},
356356

357357
_buttonEvents: {
358+
359+
// Prevent text selection from being reset when interacting with the selectmenu (#10144)
360+
mousedown: function( event ) {
361+
event.preventDefault();
362+
},
363+
358364
click: "_toggle",
365+
359366
keydown: function( event ) {
360367
var preventDefault = true;
361368
switch ( event.keyCode ) {

0 commit comments

Comments
 (0)