File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
core/src/utils/transition Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,18 @@ const beforeTransition = (opts: TransitionOptions) => {
3737 enteringEl . classList . remove ( 'can-go-back' ) ;
3838 }
3939 setPageHidden ( enteringEl , false ) ;
40+
41+ /**
42+ * When transitioning, the page should not
43+ * respond to click events. This resolves small
44+ * issues like users double tapping the ion-back-button.
45+ * These pointer events are removed in `afterTransition`.
46+ */
47+ enteringEl . style . setProperty ( 'pointer-events' , 'none' ) ;
48+
4049 if ( leavingEl ) {
4150 setPageHidden ( leavingEl , false ) ;
51+ leavingEl . style . setProperty ( 'pointer-events' , 'none' ) ;
4252 }
4353} ;
4454
@@ -56,8 +66,10 @@ const afterTransition = (opts: TransitionOptions) => {
5666 const enteringEl = opts . enteringEl ;
5767 const leavingEl = opts . leavingEl ;
5868 enteringEl . classList . remove ( 'ion-page-invisible' ) ;
69+ enteringEl . style . removeProperty ( 'pointer-events' ) ;
5970 if ( leavingEl !== undefined ) {
6071 leavingEl . classList . remove ( 'ion-page-invisible' ) ;
72+ leavingEl . style . removeProperty ( 'pointer-events' ) ;
6173 }
6274} ;
6375
You can’t perform that action at this time.
0 commit comments