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:
Ed Sanders 2021-11-02 23:33:19 +00:00
parent 11d4c397bf
commit 54471b5037

View file

@ -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' }