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

Pagecontainer: pass triggerData with load event #7581

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/widgets/pagecontainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ define( [
// Note that it is the responsibility of the listener/handler
// that called preventDefault(), to resolve/reject the
// deferred object within the triggerData.
if ( this._triggerWithDeprecated( "load" ).event.isDefaultPrevented() ) {
if ( this._triggerWithDeprecated( "load", triggerData ).event.isDefaultPrevented() ) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/pagecontainer/page_event_sequence_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ asyncTest( "Event sequence during navigation to another page", function() {

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

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

// Valid - page widget events
{ type: "pagebeforecreate", target: "other-page",
Expand Down