You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application uses pathname for routing, but can also depend on the hash (for example, to display a specific modal).
Normal cases where users click a component in the ui in order to trigger the hash change are fine since the onclick handler causes a redraw. However, when using the browser's back/forward buttons no redraw occurs. I can manually get the functionality I am looking for by setting window.onhashchange to m.redraw, but I think a check for this would make sense within the library itself.
I am using mithril version 0.2.4.
The text was updated successfully, but these errors were encountered:
I'd rather not build that in. It's pointless to redraw on hash change if you're displaying a more static page with named anchors you want to reference. In that case, you would prefer to leave everything untouched, and a redraw would be a waste of time, and it could disrupt the page's eventual jump to the hash.
My application uses pathname for routing, but can also depend on the hash (for example, to display a specific modal).
Normal cases where users click a component in the ui in order to trigger the hash change are fine since the onclick handler causes a redraw. However, when using the browser's back/forward buttons no redraw occurs. I can manually get the functionality I am looking for by setting
window.onhashchange
tom.redraw
, but I think a check for this would make sense within the library itself.I am using mithril version 0.2.4.
The text was updated successfully, but these errors were encountered: