diff --git a/core/elements/ons-back-button.spec.es6 b/core/elements/ons-back-button.spec.es6 index 9416faa664..22879ee038 100644 --- a/core/elements/ons-back-button.spec.es6 +++ b/core/elements/ons-back-button.spec.es6 @@ -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(); } }); diff --git a/core/lib/navigator-page.es6 b/core/lib/navigator-page.es6 index a16f518402..d7c0c55a3a 100644 --- a/core/lib/navigator-page.es6 +++ b/core/lib/navigator-page.es6 @@ -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) {