changeset b23d2684299c in sao:5.2
details: https://hg.tryton.org/sao?cmd=changeset;node=b23d2684299c
description:
Set url on switch callback only if it is the current tab
The callback can be triggered when the tab is no more current.
E.g. at the end of a wizard when the screen is reloaded and displayed,
the
current record is reset which trigger the callback but the wizard may
have
open a new tab meanwhile.
issue8432
review259671002
(grafted from eab82c83ad32ab4483a12fc1b432df17f7e9d2e6)
diffstat:
src/tab.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 8213755135ee -r b23d2684299c src/tab.js
--- a/src/tab.js Thu Jun 20 23:15:06 2019 +0200
+++ b/src/tab.js Thu Jun 20 23:16:56 2019 +0200
@@ -446,7 +446,9 @@
screen.message_callback = this.record_message.bind(this);
screen.switch_callback = function() {
- Sao.set_url(this.get_url(), this.name);
+ if (this === Sao.Tab.tabs.get_current()) {
+ Sao.set_url(this.get_url(), this.name);
+ }
}.bind(this);
this.set_buttons_sensitive();