1

Recently we had to migrate embedded help for Mac product to web and have referenced it from Mac HelpViewer. As far as I know MacOs HelpViewer is a custom made webkit based applilcation that is used to display product help, which has to be presented in a specifis folder structure. HelpViewer's nav and menu buttons aren't similiar to any browsers buttons, and for the rest browsers our web help works perfectly fine in SPA mode with

window.history.pushState

But once this SPA behaviour is applied to HelpViewer navigations buttons don't react (they are disabled) to changing url or adding state to window.history collection. MacOS nativa applications also have web based help, e.g: calendar app. This help is based on Ember.js and has some SPA behaviour also, but this one trigger HelpViewer's buttons to react (they become enabled) and work once clicked.

The problem I try to solve is how to trigger HelpViewer to react on changing url or window.history. Maybe ember.js does some extra stuff except for adding state into window.history?

Johnny_D
  • 4,592
  • 3
  • 33
  • 63
  • I'm currently running into this same issue with our help file. I realize this post is quite old, but if it helps at all I've found that there's a difference between calling the `pushState` function on a global scope (for example once the page is loaded), and calling it inside of a 'click' event listener. Calling `pushState` on a global scope updates the history and enables the nav buttons as expected, whereas calling from within an event listener function updates history, but doesn't enable the nav buttons. – GHandel Aug 16 '17 at 17:16
  • Oh really? Can't check it right now, since not working on that project anymore, but if it was an issue, then all I have to do is save global context reference and pass it to method, right? – Johnny_D Aug 18 '17 at 17:51
  • I wish I could say that was the answer, haha. I've gone as far as slapping a button down like this: `` with no luck on getting the history to update properly. The only placement of the `pushState` call that has worked is inside `$(document).ready()` JQuery handler. – GHandel Aug 18 '17 at 21:38

0 Answers0