Browser back button broken in source viewer

Issue #343 resolved
Rob Agar created an issue

The Chrome browser back button has no effect when viewing a file source.

This error appears in the console

ExampleDevice.yaml:671 Uncaught ReferenceError: State is not defined
at load_state (ExampleDevice.yaml:671)
at ExampleDevice.yaml:793

I thought the fix would be a simple typo fix “State.url” → “state.url” in templates/files/files.html

104             asynchtml(State.url, $files_data, function() {
105                   post_load_state(state);
106                   var expire_on = new Date().getTime() + CACHE_EXPIRE;
107                   CACHE[cache_key] = [expire_on, $files_data.html()];
108             });

but this change gets rid of the console error, but does not actually make the back button work

Comments (8)

  1. Rob Agar reporter

    Hi Thomas - the capitalized “State” is still there, so I still get the error in the console. If I manually fix the typo the back button behaves oddly - the Select Changeset drop down gets duplicated! (The browser doesn’t navigate back to the previous page.)

  2. Log in to comment