Dear Ivy Team It seems that Ivy can't handle by default the browser back button if the UI is related to a process. Your proposed solution is to suppress the back button. Imho this is not an acceptable solution especially if everything else reacts correctly to the back button. I would assume/expect that a Ivy process which is designed with multiple "back paths" should be able to support some kind of a "back button" behavior. Regards John Moser asked 18.02.2020 at 09:23 John Moser |
The hack provided here works like a charm on Chromium: https://support.google.com/chrome/thread/8721521?msgid=10849294 tested with: Chromium Version 80.0.3987.87 (Official Build) Built on Ubuntu and Axon.ivy 8.0 LTS
If added this in my main layout xhtml and now the back button is no longer doing any harm in any of my dialogs. answered 04.03.2020 at 10:41 Reguel Werme... ♦♦ SupportIvyTeam ♦♦ We had to workaround something similar, and ended up adding these lines of JS window.addEventListener('popstate', function(event) { window.location.replace('#{menuViewOverride.applicationHome}'); }, false); history.pushState({}, null, window.location.pathname); Where menuViewOverride.applicationHome can be replaced with whatever logic you need to determine the navigation of the previous page.
(22.07.2020 at 05:21)
TareqK
|
I worked for this issue recently. I could share the idea. We will use "load" and "popstate" event to detect and handle the back button in general and show a custom dialog, you will have full control of the dialog, then you can disable the back button completely. Refer the load event documentation from Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event Idea get from an answer on StackOverflow: https://stackoverflow.com/questions/18141729/browsers-back-button-click-with-confirm-box JavaScript
HTML
You should add onclick in YES/NO button, this editor prevent me adding those attribute: YES-onclick: exitPageConfirmDialog.hide(); exitPageConfirmDialog.confirmation.resolve(); NO-onclick: exitPageConfirmDialog.hide(); exitPageConfirmDialog.confirmation.reject(); Testing
In case you want temporary disable the dialog, use
Enable again
Known issue
answered 10.03.2020 at 12:15 vinh_ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 18.02.2020 at 09:23
Seen: 8,431 times
Last updated: 22.07.2020 at 05:21
According to your advise here :
we tried to disable the back button. But it turns out that it does not work for Chrome.
Approx. 60% of our users use Chrome. We are getting like 1000 errors per day because users are hitting the back button.
-> Could you provide a solution which works 100% ?
Thanks in advance.