mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Follow-up 8dfbc5baa
: Really don't select unselectable items"
This commit is contained in:
commit
d7b1cd9b4f
|
@ -109,9 +109,13 @@ ve.ui.SelectWidget.prototype.onMouseDown = function ( e ) {
|
|||
* @param {jQuery.Event} e Mouse up event
|
||||
*/
|
||||
ve.ui.SelectWidget.prototype.onMouseUp = function ( e ) {
|
||||
var item;
|
||||
this.pressed = false;
|
||||
if ( !this.selecting ) {
|
||||
this.selecting = this.getTargetItem( e );
|
||||
item = this.getTargetItem( e );
|
||||
if ( item && item.isSelectable() ) {
|
||||
this.selecting = item;
|
||||
}
|
||||
}
|
||||
if ( !this.disabled && e.which === 1 && this.selecting ) {
|
||||
this.selectItem( this.selecting );
|
||||
|
|
Loading…
Reference in a new issue