diff options
| author | Xavier Dubuc <xdu@odoo.com> | 2020-06-11 15:19:26 +0000 |
|---|---|---|
| committer | Xavier Dubuc <xdu@odoo.com> | 2020-06-16 15:52:34 +0000 |
| commit | 4ca549253be2c099294f05d8ba57384e1b7bc0d6 (patch) | |
| tree | ef439fd6acc1b61c8fa44dc0e3d9b7e8351e8a50 /addons/mail/static/src/components/composer | |
| parent | 57a32316afdd82843d0fe2381a7db5846affdb2d (diff) | |
[FIX] mail: mark message as seen only when thread composer is focused
task-2272510
closes odoo/odoo#53088
X-original-commit: edf356c2022b3039e53e82a092fc64533f59df27
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/composer')
| -rw-r--r-- | addons/mail/static/src/components/composer/composer.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/addons/mail/static/src/components/composer/composer.js b/addons/mail/static/src/components/composer/composer.js index f2135835a4d..63d85a0fb95 100644 --- a/addons/mail/static/src/components/composer/composer.js +++ b/addons/mail/static/src/components/composer/composer.js @@ -48,35 +48,13 @@ class Composer extends Component { * Reference of the text input component. */ this._textInputRef = useRef('textInput'); - /** - * Tracked focus counter from props. Useful to determine whether it - * should auto focus this composer when patched. - */ - this._focusCount = 0; - // to focus if the prop changes - this._lastComposer = undefined; this._onClickCaptureGlobal = this._onClickCaptureGlobal.bind(this); } mounted() { - this._lastComposer = this.composer; - if (this.props.isFocusOnMount) { - this.focus(); - } document.addEventListener('click', this._onClickCaptureGlobal, true); } - patched() { - // focus when changing composer - if ( - this.props.isFocusOnMount && - this._lastComposer !== this.composer - ) { - this.focus(); - } - this._lastComposer = this.composer; - } - willUnmount() { document.removeEventListener('click', this._onClickCaptureGlobal, true); } @@ -338,7 +316,6 @@ Object.assign(Composer, { isCompact: true, isDiscardOnClickAway: false, isExpandable: false, - isFocusOnMount: false, isLog: false, }, props: { @@ -382,7 +359,6 @@ Object.assign(Composer, { isCompact: Boolean, isDiscardOnClickAway: Boolean, isExpandable: Boolean, - isFocusOnMount: Boolean, isLog: Boolean, }, template: 'mail.Composer', |
