From 9d636d83674aac06d69747a5db57f0da2e831257 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 15 Mar 2018 15:30:58 +0300 Subject: [PATCH] For Bug 37192: don't change font name when focus is in the font combobox. --- apps/common/main/lib/component/ComboBoxFonts.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index 4d3e6b531..9ec995f7a 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -112,6 +112,8 @@ define([ this._input.on('keyup', _.bind(this.onInputKeyUp, this)); this._input.on('keydown', _.bind(this.onInputKeyDown, this)); + this._input.on('focus', _.bind(function() {this.inFormControl = true;}, this)); + this._input.on('blur', _.bind(function() {this.inFormControl = false;}, this)); this._modalParents = this.cmpEl.closest('.asc-window'); @@ -318,6 +320,8 @@ define([ }, onApiChangeFont: function(font) { + if (this.inFormControl) return; + var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName()); if (this.getRawValue() !== name) {