I have used the “browser history back” trick that use a script in the button link settings that I originally found it here on several sites.
I never got the history.go()-1 script to work as described in the post, but javascript:window.history.go(-1); seemed to work fine. Now it has stopped working. In Chrome it sends me to an ‘about:blank’ page, in Firefox the button just dont work. I have checked that the ‘http://’ is not automatically added to the link.
I had to find a solution immediately yesterday so I ended up using an embed element as a back button, for some reason that worked fine.
/* Embed element */
<button onclick="goBack()" class="BUTTON CLASS NAME"></button>
/* In Costom code */
<script>
function goBack() {
window.history.back();
}
</script>
Also, I had a different bug yesterday where ‘div link’ elements inside collection lists stopped working (nothing happened when pressing the element). The ‘link div’ was connected to a collection field with a dropbox link. When replacing the ‘link div’ element with a button element, all was back to normal. I dont know if its related, just mentioning it since my back button bug in this post was in a collection template page… as in; collections was involved in both my bugs yesterday.
The fix for this should be deployed today everyone
If you are still unable to use the “`” to remove the https:// from the link field by tomorrow morning, please let me know and we can investigate this further.
Thanks again for your help and patience on this.
The problem is not being able to add ` to remove the http://
Its more that, as of this week, writing javascript:history.back() in the link is useless because it now triggers a target blank rather than going back…
The idea was to use the webflow link element to do this :
A “back” method is the best way for this interaction since we also have thumbs on the homepage that one can go to, so it would not be taking one back to the same place every time.
I understand that this is not technically a bug since it is “custom code,” but it was working just fine and now it’s not. Also, listing something as a bug seems to be only way to get a quick response on the forums these days.
A workable alternative that sends one back to where they came from would be great and essential!