Make React router raise an error when History.replaceState()
URL is not of the same origin as the current URL
#20872
Labels
History.replaceState()
URL is not of the same origin as the current URL
#20872
Currently, in Vaadin applications with React router enabled, when invoking
Page.getHistory().replaceState()
passing an absolute URL that is not of the same origin as the current URL, the browser URL is updated by appending the given URL to the document URL.For example,
Page.getHistory().replaceState(null, "http://www.google.com")
will result in the browser URL to behttp://localhost:8080/http://www.google.com
.However, with Vaadin router, the same call results in an error in the browser console
Based on the Javascript
History.replaceState()
documentation, this seems to be the expected behavior.It would make sense that the Vaadin application behaves the same way, regardless of the router used.
The text was updated successfully, but these errors were encountered: