changeset 8150919d016a in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset;node=8150919d016a
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 36bee229469e -r 8150919d016a src/tab.js
--- a/src/tab.js Wed Jun 12 19:06:19 2019 +0200
+++ b/src/tab.js Thu Jun 20 23:16:56 2019 +0200
@@ -484,7 +484,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();