mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Merge pull request #5754 from panoschal/fix/pills-selection-bug
Allow pills on the beginning of a part string
This commit is contained in:
commit
9ac5f4d2ee
1 changed files with 7 additions and 1 deletions
|
@ -189,7 +189,13 @@ abstract class PlainBasePart extends BasePart {
|
|||
if (chr !== "@" && chr !== "#" && chr !== ":" && chr !== "+") {
|
||||
return true;
|
||||
}
|
||||
// only split if the previous character is a space
|
||||
|
||||
// split if we are at the beginning of the part text
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// or split if the previous character is a space
|
||||
// or if it is a + and this is a :
|
||||
return this._text[offset - 1] !== " " &&
|
||||
(this._text[offset - 1] !== "+" || chr !== ":");
|
||||
|
|
Loading…
Reference in a new issue