changeset eab82c83ad32 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=eab82c83ad32
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
diffstat:
src/tab.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 314bc519d00e -r eab82c83ad32 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();