Fixed Toolbar: removing popup removes ui-page-header-fixed class #7252
Fixed Toolbar: removing popup removes ui-page-header-fixed class #7252
Conversation
@@ -278,11 +278,18 @@ define( [ "jquery", "../widget", "../core", "../animationComplete", "../navigati | |||
|
|||
_destroy: function() { | |||
var $el = this.element, | |||
header = $el.hasClass( "ui-header" ); | |||
header = $el.hasClass( "ui-header" ), | |||
hasFixedChildren = $el.closest( ".ui-page" ).children( ".ui-header-fixed" ).length > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line length
Throughout both js files lots of hungarian notation used the style guide does not allow for hungarian notation. |
@arschmitz I updated the pr with another commit. feel free to review whenever. |
@arschmitz I have updated this pr. I had left the |
Yes I only mentioned it here because its one your actually using. I think a new issue to clean this file up is the right way to go for the rest. |
@cgack it looks like you don't have your full name ( only have cgack ) in your git config can you update this please. |
Iv just realized there is a much bigger issue here, that any time you destroy any toolbar its treating it as a fixed toolbar. Popup's toolbar is not fixed and so the logic from the fixedtoolbar extension should not even be running in the first place. Also we are never calling |
@arschmitz I've updated my git config on that machine so it'll be ready for the next push. |
@cgack ahh good point ok so destroy here is a mess lol. This is all really the same issue though that toolbars So I think we need to just update the issue and fix the real problem here. |
Okay - i'll work on getting |
@cgack Thanks sorry to initially lead you down the wrong path! |
@arschmitz Thinking maybe we should push this to milestone 1.4.4 so that adding |
@cgack you are probably right unless you get to it in next few days |
@arschmitz I went ahead and gave it a go at adding |
@cgack without having read any of the thread except the part about where to put it back, I can tell you that, in popup, where I also move |
This PR is meant to fix issues that have a 1.4.x milestone. That brings up the discussion again if adding a missing method can be considered as a bug fix and land in a maintenance release or a new feature which should wait until next version. IINM the outcome of previous discussions was that adding methods always has to wait until next version. I suggest we open a new ticket for Toolbar widget review (already on our roadmap for 1.5) and re-milestone #6987 and #6939 to 1.5. |
@uGoMobi its always been there just not correctly implemented |
Ok, found the |
.removeAttr( "aria-level" ); | ||
|
||
if ( this.role === "header" ) { | ||
this.element.children( "a, button" ).removeClass( "ui-btn-left ui-btn-right" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at least for 1.4.4 we need to remove all the button classes since the button is enhanced as part of the enhancement process on the toolbar it should be destroyed as well.
@arschmitz went the the PR and made the requested changes. Thanks for the review! |
hasFixedChildren = $.mobile.document.find( ".ui-header-fixed" ) | ||
.length > 0; | ||
toolbarClasses = "ui-header-fixed ui-footer-fixed ui-header-fullscreen in out"; | ||
toolbarClasses += " ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather then doing +=
do
toolbarClasses = "ui-header-fixed ui-footer-fixed ui-header-fullscreen in out" +
" ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden";
@arschmitz I made some more adjustments per your PR comments. Thanks for reviewing! |
if ( this.options.position === "fixed" ) { | ||
hasFixed = $( "body>.ui-" + this.role + "-fixed" ) | ||
.add( page ) | ||
.find( ".ui-" + this.options.role + "-fixed" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok while this works and i suggested it i think i typed it with a parentheses in the wrong place :/
should be
$( "body>.ui-" + this.role + "-fixed" ).add( page.find( ".ui-" + this.options.role + "-fixed" ) ).not( this.element ).length > 0;
same for fullscreen checkbelow
@arschmitz I have modified the PR. Thanks for the review! |
@cgack looks good 👍 will land shortly |
0c46cc9
to
2aaac08
Compare
2aaac08
to
1cc1611
Compare
@arschmitz rebased with master and updated - hopefully the line endings are good now |
Fixes #6987
Fixes #6939