There are 2 tab and both tab have monitor “tabBeforeRemove”. When switch between 2 tab, the “tabBeforeRemove” event will be fired normally. If tab inside has router and jump to another page (out of tab), the “tabBeforeRemove” doesn’t fire. However can I trigger “tabBeforeRemove” on leaving tab?
You need to listen for
pageBeforeOut on tab’s parent page. Moving to pages doesn’t remove/hide tabs
What should I do if I have following case.
[Tab1] Product summary will call [Page1] “Item Detail” page
[Tab2] Part summary will call [Page1] “Item Detail” page
[Tab1] trigger app.off(‘resize’, function1) on own “tabBeforeRemove”
[Tab2] trigger app.off(‘resize’, function2) on own “tabBeforeRemove”
[Page1] trigger app.off(‘resize’, function3) on own “pageBeforeRemove”
[Tab1] → [Tab2] is fine, function1 is working
[Tab2] → [Tab1] is fine, function2 is working
[Tab1] → [Page1] is not working, function1 isn’t executed
[Tab2] → [Page1] is not working, function2 isn’t executed
How can I trigger the event when leave from the screen [Tab1] (or [Tab2]) to [Page1]?