Skip to content

Commit

Permalink
Merge pull request #1107 from OnsenUI/back-button-fix
Browse files Browse the repository at this point in the history
Back button fix
  • Loading branch information
argelius committed Dec 10, 2015
2 parents d236ded + a84abd7 commit bb93d7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/elements/ons-back-button.spec.es6
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ describe('OnsBackButtonElement', () => {
onTransitionEnd: () => {
let element = nav.querySelector('ons-back-button');
element.setAttribute('on-transition-end',
'function() {\
`function() {\
var localPromise = window.onTransitionEndCompleted;\
window.onTransitionEndCompleted = null;\
localPromise();\
}');
}`);
element._onClick();
}
});
Expand Down
4 changes: 4 additions & 0 deletions core/lib/navigator-page.es6
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ limitations under the License.
this.initialContent = params.initialContent;
this.backButton = util.findChildRecursively(this.element, 'ons-back-button');

if (this.backButton) {
CustomElements.upgrade(this.backButton);
}

// Block events while page is being animated to stop scrolling, pressing buttons, etc.
this._blockEvents = (event) => {
if (this.navigator._isPopping || this.navigator._isPushing) {
Expand Down

0 comments on commit bb93d7b

Please sign in to comment.