0

We have a Marionette view, let's call it 'products' there we have a 'submit' button, which shows another view, but, without changing the URL. So, the problem is, that inside the 'submit' view, if the user presses the back button, they expect to go to the 'products' view, but instead, they are taken back to the 'home' view, because we didn't change the URL when showing 'submit'.

So how can we push a state in history without changing the URL?

Emilios1995
  • 487
  • 5
  • 20

1 Answers1

0

See Backbone.js routing without changing url .

An idea - ripped from the answer but changed the name of the function so it doesn't override the current navigate:

Router = Backbone.Router.extend({

  navigateQuietly: function (url) {

    // Override pushstate and load url directly
    Backbone.history.loadUrl(url);

  }

});
Community
  • 1
  • 1
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
  • Thanks, but this doesn't answer my question, what i need is the browser's back button to work even if there was not a change in the url. – Emilios1995 Aug 25 '15 at 19:29