Streaming live at 10am (PST)

Custom "skip to content" link hashchange event not firing

#1

Hi

I have converted a Webflow site into a custom WordPress theme. I have done this several times and everything works perfectly.

The issue I have is that I am trying to include some custom code to listen to the hashchange event on the window object in order to set focus to the element being linked to, to improve accessibility for keyboard users. I am using the script provided with the underscores theme, the issue is described here: https://git.io/vWdr2

After some testing, it seems that the custom hashchange event function is never called when the webflow script is included.

Is this because the webflow script stops propagation when handling the “scroll to element” behaviour? Is there a way to allow the event to propagate? Can this functionality be replicated when building the website in webflow?

Thanks