ce.MWReferenceListNode: Only open dialog on unmodified left clicks

Change-Id: I06f6e2cc89f595e6dcc931b78c908ff2270e4629
This commit is contained in:
Ed Sanders 2024-03-28 15:30:43 +00:00
parent 5369076028
commit d368f45c17

View file

@ -268,7 +268,7 @@ ve.ce.MWReferencesListNode.prototype.update = function () {
if ( this.getRoot() ) { if ( this.getRoot() ) {
const surface = this.getRoot().getSurface().getSurface(); const surface = this.getRoot().getSurface().getSurface();
$li.on( 'mousedown', function ( e ) { $li.on( 'mousedown', function ( e ) {
if ( modelNode && modelNode.length ) { if ( ve.isUnmodifiedLeftClick( e ) && modelNode && modelNode.length ) {
const items = ve.ui.contextItemFactory.getRelatedItems( [ firstNode ] ) const items = ve.ui.contextItemFactory.getRelatedItems( [ firstNode ] )
.filter( ( item ) => item.name !== 'mobileActions' ); .filter( ( item ) => item.name !== 'mobileActions' );
if ( items.length ) { if ( items.length ) {