Don't call onSizemodeChange on the initialization process, if it is not fullscreen
This commit is contained in:
parent
5587ca68c6
commit
951816d187
@ -72,8 +72,7 @@ FullscreenObserver.prototype = {
|
||||
aMutations.forEach(function(aMutation) {
|
||||
if (aMutation.type != 'attributes')
|
||||
return;
|
||||
if (aMutation.attributeName == 'sizemode' &&
|
||||
this.window.document.documentElement.getAttribute('sizemode') == 'fullscreen')
|
||||
if (aMutation.attributeName == 'sizemode')
|
||||
this.window.setTimeout((function() {
|
||||
this.onSizeModeChange();
|
||||
}).bind(this), 10);
|
||||
@ -84,6 +83,8 @@ FullscreenObserver.prototype = {
|
||||
{
|
||||
var w = this.window:
|
||||
var d = w.document;
|
||||
if (d.documentElement.getAttribute('sizemode') != 'fullscreen')
|
||||
return;
|
||||
|
||||
var toolbox = w.gNavToolbox;
|
||||
toolbox.style.marginTop = -toolbox.getBoundingClientRect().height + 'px';
|
||||
|
Loading…
Reference in New Issue
Block a user