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) {
|
aMutations.forEach(function(aMutation) {
|
||||||
if (aMutation.type != 'attributes')
|
if (aMutation.type != 'attributes')
|
||||||
return;
|
return;
|
||||||
if (aMutation.attributeName == 'sizemode' &&
|
if (aMutation.attributeName == 'sizemode')
|
||||||
this.window.document.documentElement.getAttribute('sizemode') == 'fullscreen')
|
|
||||||
this.window.setTimeout((function() {
|
this.window.setTimeout((function() {
|
||||||
this.onSizeModeChange();
|
this.onSizeModeChange();
|
||||||
}).bind(this), 10);
|
}).bind(this), 10);
|
||||||
@ -84,6 +83,8 @@ FullscreenObserver.prototype = {
|
|||||||
{
|
{
|
||||||
var w = this.window:
|
var w = this.window:
|
||||||
var d = w.document;
|
var d = w.document;
|
||||||
|
if (d.documentElement.getAttribute('sizemode') != 'fullscreen')
|
||||||
|
return;
|
||||||
|
|
||||||
var toolbox = w.gNavToolbox;
|
var toolbox = w.gNavToolbox;
|
||||||
toolbox.style.marginTop = -toolbox.getBoundingClientRect().height + 'px';
|
toolbox.style.marginTop = -toolbox.getBoundingClientRect().height + 'px';
|
||||||
|
Loading…
Reference in New Issue
Block a user