For Bug 37192: don't change font name when focus is in the font combobox.
This commit is contained in:
parent
5b3dab1239
commit
9d636d8367
|
@ -112,6 +112,8 @@ define([
|
||||||
|
|
||||||
this._input.on('keyup', _.bind(this.onInputKeyUp, this));
|
this._input.on('keyup', _.bind(this.onInputKeyUp, this));
|
||||||
this._input.on('keydown', _.bind(this.onInputKeyDown, 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');
|
this._modalParents = this.cmpEl.closest('.asc-window');
|
||||||
|
|
||||||
|
@ -318,6 +320,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiChangeFont: function(font) {
|
onApiChangeFont: function(font) {
|
||||||
|
if (this.inFormControl) return;
|
||||||
|
|
||||||
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName());
|
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName());
|
||||||
|
|
||||||
if (this.getRawValue() !== name) {
|
if (this.getRawValue() !== name) {
|
||||||
|
|
Loading…
Reference in a new issue