Commit graph

3 commits

Author SHA1 Message Date
Paolo Amadini
91212fa6b1 Bug 1428839 - Part 4 - Avoid re-entrancy in PanelMultiView navigation functions. r=Gijs
We now use the "active" property of views to track whether navigation is possible. This has the advantage of being already handled correctly when views are moved to a different panel, and is in line with the purpose of the "active" state. The note about using the "popupshown" event for navigation has been updated accordingly.

Keyboard navigation is also linked to the "active" property now, so there is no need to track the state of the "_transitioning" property anymore.

Since the goBack and showSubView methods can only be called when the view is active, we don't need to check for attempts to start a transition while the panel is closed anymore.

MozReview-Commit-ID: 3KT3A5EwGFy

--HG--
extra : rebase_source : c338362923a7574210c7329bb84316d549898fdc
2018-02-27 15:33:33 +00:00
Paolo Amadini
61b6cbe98e Bug 1440358 - Part 2 - Add tests for cancellation while opening a view. r=Gijs
This includes both canceling the ViewShowing event and calling the hidePopup method of PanelMultiView.

MozReview-Commit-ID: Goo45SEBC3z

--HG--
extra : rebase_source : d78376d7a69dd47157e049da1aaa19e97b9bd12c
2018-02-25 19:49:00 +00:00
Paolo Amadini
4d3254c032 Bug 1440358 - Part 1 - Add unit tests for PanelMultiView. r=Gijs
MozReview-Commit-ID: 3WM2Skrg3QV

--HG--
extra : rebase_source : 10a8080363a1c17013e249947314671389d04613
2018-02-26 13:45:09 +00:00