зеркало из https://github.com/mozilla/gecko-dev.git
Bug 769234 - [devtb] GCLI has focus issues when embedded in firefox; r=dcamp
This commit is contained in:
Родитель
9fcb387d40
Коммит
8ffdb2d7a4
|
@ -6868,6 +6868,10 @@ FocusManager.prototype._checkShow = function() {
|
|||
* available inputs
|
||||
*/
|
||||
FocusManager.prototype._shouldShowTooltip = function() {
|
||||
if (!this._hasFocus) {
|
||||
return { visible: false, reason: '!hasFocus' };
|
||||
}
|
||||
|
||||
if (eagerHelper.value === Eagerness.NEVER) {
|
||||
return { visible: false, reason: 'eagerHelper !== NEVER' };
|
||||
}
|
||||
|
@ -6896,6 +6900,10 @@ FocusManager.prototype._shouldShowTooltip = function() {
|
|||
* available inputs
|
||||
*/
|
||||
FocusManager.prototype._shouldShowOutput = function() {
|
||||
if (!this._hasFocus) {
|
||||
return { visible: false, reason: '!hasFocus' };
|
||||
}
|
||||
|
||||
if (this._recentOutput) {
|
||||
return { visible: true, reason: 'recentOutput' };
|
||||
}
|
||||
|
|
|
@ -179,6 +179,9 @@ DeveloperToolbar.prototype._onload = function DT_onload()
|
|||
scratchpad: null
|
||||
});
|
||||
|
||||
this.display.focusManager.addMonitoredElement(this.outputPanel._frame);
|
||||
this.display.focusManager.addMonitoredElement(this._element);
|
||||
|
||||
this.display.onVisibilityChange.add(this.outputPanel._visibilityChanged, this.outputPanel);
|
||||
this.display.onVisibilityChange.add(this.tooltipPanel._visibilityChanged, this.tooltipPanel);
|
||||
this.display.onOutput.add(this.outputPanel._outputChanged, this.outputPanel);
|
||||
|
@ -310,6 +313,9 @@ DeveloperToolbar.prototype.destroy = function DT_destroy()
|
|||
let tabs = this._chromeWindow.getBrowser().tabs;
|
||||
Array.prototype.forEach.call(tabs, this._stopErrorsCount, this);
|
||||
|
||||
this.display.focusManager.removeMonitoredElement(this.outputPanel._frame);
|
||||
this.display.focusManager.removeMonitoredElement(this._element);
|
||||
|
||||
this.display.onVisibilityChange.remove(this.outputPanel._visibilityChanged, this.outputPanel);
|
||||
this.display.onVisibilityChange.remove(this.tooltipPanel._visibilityChanged, this.tooltipPanel);
|
||||
this.display.onOutput.remove(this.outputPanel._outputChanged, this.outputPanel);
|
||||
|
|
Загрузка…
Ссылка в новой задаче