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

Toolbar: Figure out why _addBackButton() is called twice when the toolbar has fixed positioning #6567

Closed
gabrielschulhof opened this issue Oct 4, 2013 · 2 comments

Comments

@gabrielschulhof
Copy link

I came across this issue while fixing #6554. The quick solution was to check if I had already instantiated the back button, but we need to check why the function _addBackButton() is getting called twice during toolbar instantiation.

It looks like _addBackButton() is getting called from _setOptions() both times, so we need to figure out why _setOptions() runs twice during instantiation. It should not run at all.

@rmcdaniel
Copy link

I'm working on this now.

@rmcdaniel
Copy link

When I comment out this line, the issue disappears...

https://github.com/jquery/jquery-mobile/blob/master/js/widgets/fixedToolbar.js#L39

Obviously, this isn't a fix since now _makeFixed() is never called but it's getting us closer. Also, I see that _create() calls _makeFixed() and _makeFixed() calls _setOptions(), but _setOptions() calls _makeFixed() again. That doesn't seem right.

gabrielschulhof pushed a commit that referenced this issue Feb 7, 2014
Note by Gabriel Schulhof <gabriel.schulhof@intel.com>: Edited commit message to
comply with new style guide and replaced author with real name.

Fixes gh-6567
@gabrielschulhof gabrielschulhof added this to the 1.4.2 milestone Feb 13, 2014
@gabrielschulhof gabrielschulhof self-assigned this Feb 13, 2014
gabrielschulhof pushed a commit that referenced this issue Aug 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants