mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
make consecutive :/@/# separate pill candidates
e.g. accept the first character always to start the autocompletion but after that refer to the plainpart logic to split up in new pill candidates. Also, don't allow merging adjacent parts. This makes sure that "@nonmatchingfoo @someuser" only matches "someuser" in the autocomplete.
This commit is contained in:
parent
a024fd8991
commit
cf5e4d3d94
@ -313,8 +313,16 @@ export class PillCandidatePart extends PlainPart {
|
||||
return this._autoCompleteCreator(updateCallback);
|
||||
}
|
||||
|
||||
acceptsInsertion(chr) {
|
||||
return true;
|
||||
acceptsInsertion(chr, i) {
|
||||
if (i === 0) {
|
||||
return true;
|
||||
} else {
|
||||
return super.acceptsInsertion(chr, i);
|
||||
}
|
||||
}
|
||||
|
||||
merge() {
|
||||
return false;
|
||||
}
|
||||
|
||||
acceptsRemoval(position, chr) {
|
||||
|
Loading…
Reference in New Issue
Block a user