Back button doesn't work after link canceled

I’m using this back button: <a href="#" class="back link">

This buttons works great. But when I click on a link on the page this button doesn’t work. The link is /details/12345/ and there resolve through routes.js is canceled and a error message is displayed.

I click on the link /details/12345/ but the pages is not opened, because I display an error through the routes.js entry.

The only way it works is: <a href="#" class="back link" data-force="true">

But this version of the buttons has the disadvantage that the whole pages is reloaded and that takes some time.

Why does the back-button doesn’t work after the link is canceled? How can I fix the normal back button without the usage of data-force="true"

The code is fine there is no error in js or else.

Didn’t really get what is the issue. What do you mean by “link canceled”? What is ther error message?