mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 02:48:18 +00:00
UsernameCompletion: Disable fragment auto-select
This causes the username to be selected on mobile, when we want to place the cursor after it. Bug: T294616 Change-Id: I29012ecd04cd553bf78ffff477babafacfeabb31
This commit is contained in:
parent
11d4c397bf
commit
54471b5037
|
@ -163,7 +163,7 @@ MWUsernameCompletionAction.prototype.insertCompletion = function ( word, range )
|
|||
return MWUsernameCompletionAction.super.prototype.insertCompletion.call( this, word, range );
|
||||
}
|
||||
|
||||
var fragment = this.surface.getModel().getLinearFragment( range );
|
||||
var fragment = this.surface.getModel().getLinearFragment( range, true );
|
||||
fragment.removeContent().insertContent( [
|
||||
{ type: 'mwPing', attributes: { user: word } },
|
||||
{ type: '/mwPing' }
|
||||
|
|
Loading…
Reference in a new issue