[Fix] mail: ensures composer cleanup on message post
Before this commit, the state of the composer was not properly saving its state when focusing out, which caused erroneous composer states in some corner cases, like when posting messages on mobile in some browsers. This commit fixes this issue. opw-2366374 closes odoo/odoo#60913 X-original-commit: 8e79fefdb9990a6480fdae2684e07799e5439b06 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
This commit is contained in:
co-authored by
Sébastien Theys
parent
abb7d2dab9
commit
a2d216a80d
@@ -278,12 +278,6 @@ class ChatWindow extends Component {
|
||||
* @private
|
||||
*/
|
||||
_onFocusout() {
|
||||
if (this._inputRef.comp) {
|
||||
this._inputRef.comp.focusout();
|
||||
}
|
||||
if (this._threadRef.comp) {
|
||||
this._threadRef.comp.focusout();
|
||||
}
|
||||
if (!this.chatWindow) {
|
||||
// ignore focus out due to record being deleted
|
||||
return;
|
||||
|
||||
@@ -186,6 +186,7 @@ class ComposerTextInput extends Component {
|
||||
* @private
|
||||
*/
|
||||
_onFocusoutTextarea() {
|
||||
this.saveStateInStore();
|
||||
this.composer.update({ hasFocus: false });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user