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

Commit d1bb77f

Browse files
Rob DiCiuccioarschmitz
authored andcommitted
Pagecontainer: Pass triggerData with load event
Fixes gh-7580 Closes gh-7581 (cherry picked from commit af08283)
1 parent 62695d4 commit d1bb77f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

js/widgets/pagecontainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ define( [
538538
// Note that it is the responsibility of the listener/handler
539539
// that called preventDefault(), to resolve/reject the
540540
// deferred object within the triggerData.
541-
if ( this._triggerWithDeprecated( "load" ).event.isDefaultPrevented() ) {
541+
if ( this._triggerWithDeprecated( "load", triggerData ).event.isDefaultPrevented() ) {
542542
return;
543543
}
544544

tests/integration/pagecontainer/page_event_sequence_core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ asyncTest( "Event sequence during navigation to another page", function() {
9898

9999
// Deprecated as of 1.4.0
100100
{ type: "pageload", target: "the-body",
101-
data: { prevPage: undefined, nextPage: undefined, toPage: undefined } },
101+
data: { prevPage: "start-page", nextPage: undefined, toPage: "other-page" } },
102102

103103
// Valid
104104
{ type: "pagecontainerload", target: "the-body",
105-
data: { prevPage: undefined, nextPage: undefined, toPage: undefined } },
105+
data: { prevPage: "start-page", nextPage: undefined, toPage: "other-page" } },
106106

107107
// Valid - page widget events
108108
{ type: "pagebeforecreate", target: "other-page",

0 commit comments

Comments
 (0)