Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

data-transition attribute no longer works in 2.2.2 #106

Closed ashthornton closed 3 years ago

ashthornton commented 3 years ago

Using data-transition for a contextual transition no longer works as of 2.2.2. Looks like it could be due to the recent fix in redirect().

You can see an example here: https://codepen.io/ashthornton/project/editor/AypMLG (ignore all the ASScroll stuff, I'm just using this to quickly demo the problem)

Oh, and as a side note, your console log Highway version hasn't updated since v2.2.0 :)

michaelkoelewijn91 commented 3 years ago

Can confirm. Using a contextual transition (triggered by a data-transition link) throws the following error: highway.js:130 Uncaught TypeError: Cannot read property 'prototype' of undefined

highway.js#130: this.Contextual = false, e3 && (this.Contextual = this.Transitions[e3].prototype, this.Contextual.name = e3), i2.origin !== this.location.origin || i2.anchor && i2.pathname === this.location.pathname ? window.location.href = t3 : (this.location = i2, this.beforeFetch());

Anthodpnt commented 3 years ago

We rolled back to the 2.2.1 version. 2.2.2 no longer exists for now. Sorry for the inconvenience.