mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 02:23:28 +08:00
fix(spellchecker): Make sure spellchecker returns selection to its original state
This also fixes the scenario where the link editor wouldn't pop up properly with misspelled words.
This commit is contained in:
parent
44d8d823a0
commit
0b82543c44
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ export default class SpellcheckComposerExtension extends ComposerExtension {
|
|||
selectionSnapshot[`${prop}Node`] = afterMatchNode;
|
||||
selectionSnapshot[`${prop}Offset`] -= match.index + match[0].length;
|
||||
selectionSnapshot.modified = true;
|
||||
} else if (selectionSnapshot[`${prop}Offset`] > match.index) {
|
||||
} else if (selectionSnapshot[`${prop}Offset`] >= match.index) {
|
||||
selectionSnapshot[`${prop}Node`] = spellingSpan.childNodes[0];
|
||||
selectionSnapshot[`${prop}Offset`] -= match.index;
|
||||
selectionSnapshot.modified = true;
|
||||
|
|
Loading…
Reference in a new issue