Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 0c46cc9

Browse files
committed
Toolbar: removing popup removes page-header-fixed class
Fixes gh-6978 Fixes gh-6939
1 parent 2457d2a commit 0c46cc9

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

js/widgets/fixedToolbar.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,10 @@ define( [ "jquery", "../widget", "../core", "../animationComplete", "../navigati
284284
this._super();
285285
if ( this.options.position === "fixed" ) {
286286
hasFixed = $( "body>.ui-" + this.role + "-fixed" )
287-
.add( page )
288-
.find( ".ui-" + this.options.role + "-fixed" )
287+
.add( page.find( ".ui-" + this.options.role + "-fixed" ) )
289288
.not( this.element ).length > 0;
290289
hasFullscreen = $( "body>.ui-" + this.role + "-fixed" )
291-
.add( page )
292-
.find( ".ui-" + this.options.role + "-fullscreen" )
290+
.add( page.find( ".ui-" + this.options.role + "-fullscreen" ) )
293291
.not( this.element ).length > 0;
294292
toolbarClasses = "ui-header-fixed ui-footer-fixed ui-header-fullscreen in out" +
295293
" ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden";

js/widgets/toolbar.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,10 @@ define( [
148148
}
149149
}
150150

151-
if ( this.options.theme !== undefined ) {
152-
currentTheme = this.options.theme ? this.options.theme : "inherit";
153-
this.element.removeClass( "ui-bar-" + currentTheme );
154-
}
151+
currentTheme = this.options.theme ? this.options.theme : "inherit";
152+
this.element.removeClass( "ui-bar-" + currentTheme );
155153

156-
this.element
157-
.removeClass( "ui-" + this.role )
158-
.removeAttr( "role" );
154+
this.element.removeClass( "ui-" + this.role ).removeAttr( "role" );
159155
}
160156
});
161157

0 commit comments

Comments
 (0)