mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
parent
1d572f051a
commit
7e43405269
@ -21,7 +21,7 @@ common.testWidget( "selectmenu", {
|
|||||||
},
|
},
|
||||||
width: false,
|
width: false,
|
||||||
|
|
||||||
// callbacks
|
// Callbacks
|
||||||
change: null,
|
change: null,
|
||||||
close: null,
|
close: null,
|
||||||
create: null,
|
create: null,
|
||||||
|
@ -58,7 +58,7 @@ return $.widget( "ui.selectmenu", {
|
|||||||
},
|
},
|
||||||
width: false,
|
width: false,
|
||||||
|
|
||||||
// callbacks
|
// Callbacks
|
||||||
change: null,
|
change: null,
|
||||||
close: null,
|
close: null,
|
||||||
focus: null,
|
focus: null,
|
||||||
@ -169,7 +169,7 @@ return $.widget( "ui.selectmenu", {
|
|||||||
select: function( event, ui ) {
|
select: function( event, ui ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// support: IE8
|
// Support: IE8
|
||||||
// If the item was selected via a click, the text selection
|
// If the item was selected via a click, the text selection
|
||||||
// will be destroyed in IE
|
// will be destroyed in IE
|
||||||
that._setSelection();
|
that._setSelection();
|
||||||
@ -410,12 +410,12 @@ return $.widget( "ui.selectmenu", {
|
|||||||
selection.removeAllRanges();
|
selection.removeAllRanges();
|
||||||
selection.addRange( this.range );
|
selection.addRange( this.range );
|
||||||
|
|
||||||
// support: IE8
|
// Support: IE8
|
||||||
} else {
|
} else {
|
||||||
this.range.select();
|
this.range.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
// support: IE
|
// Support: IE
|
||||||
// Setting the text selection kills the button focus in IE, but
|
// Setting the text selection kills the button focus in IE, but
|
||||||
// restoring the focus doesn't kill the selection.
|
// restoring the focus doesn't kill the selection.
|
||||||
this.button.focus();
|
this.button.focus();
|
||||||
@ -446,7 +446,7 @@ return $.widget( "ui.selectmenu", {
|
|||||||
this.range = selection.getRangeAt( 0 );
|
this.range = selection.getRangeAt( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// support: IE8
|
// Support: IE8
|
||||||
} else {
|
} else {
|
||||||
this.range = document.selection.createRange();
|
this.range = document.selection.createRange();
|
||||||
}
|
}
|
||||||
@ -638,7 +638,7 @@ return $.widget( "ui.selectmenu", {
|
|||||||
this.menu.outerWidth( Math.max(
|
this.menu.outerWidth( Math.max(
|
||||||
this.button.outerWidth(),
|
this.button.outerWidth(),
|
||||||
|
|
||||||
// support: IE10
|
// Support: IE10
|
||||||
// IE10 wraps long text (possibly a rounding bug)
|
// IE10 wraps long text (possibly a rounding bug)
|
||||||
// so we add 1px to avoid the wrapping
|
// so we add 1px to avoid the wrapping
|
||||||
this.menu.width( "" ).outerWidth() + 1
|
this.menu.width( "" ).outerWidth() + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user