Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Toolbar: Figure out why _addBackButton() is called twice when the toolbar has fixed positioning #6567
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.
When I comment out this line, the issue disappears...
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.