diff options
| author | Julien Giannone <jgi@odoo.com> | 2020-11-20 07:47:37 +0000 |
|---|---|---|
| committer | Julien Giannone <jgi@odoo.com> | 2020-11-24 11:00:53 +0000 |
| commit | d498f899aa2ef81acbcd035896b9fcc912e4d52b (patch) | |
| tree | 5d10f75772d1c13949f0dba9e8c90983f324ca12 /addons/mail/static/src/models | |
| parent | 9896af94ebc887d98ccf44e6568ef7eeb5a27172 (diff) | |
[FIX] mail: fix text selection in composer using SHIFT and arrow keys
This commit corrects the faulty SHIFT + ArrowKey selection behavior.
task-2388650
closes odoo/odoo#62059
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models')
| -rw-r--r-- | addons/mail/static/src/models/composer/composer.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/mail/static/src/models/composer/composer.js b/addons/mail/static/src/models/composer/composer.js index 2e087a1bb72..49ed975d70e 100644 --- a/addons/mail/static/src/models/composer/composer.js +++ b/addons/mail/static/src/models/composer/composer.js @@ -45,6 +45,9 @@ function factory(dependencies) { } detectSuggestionDelimiter() { + if (this.textInputCursorStart !== this.textInputCursorEnd) { + return; + } const lastInputChar = this.textInputContent.substring(this.textInputCursorStart - 1, this.textInputCursorStart); const suggestionDelimiters = ['@', ':', '#', '/']; if (suggestionDelimiters.includes(lastInputChar) && !this.hasSuggestions) { @@ -1043,6 +1046,9 @@ function factory(dependencies) { textInputCursorStart: attr({ default: 0, }), + textInputSelectionDirection: attr({ + default: "none", + }), thread: one2one('mail.thread', { inverse: 'composer', }), |
