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
This commit is contained in:
Cédric Krier committed 2019-06-20 23:16:56 +02:00
1 parent 9d820ef4cc
commit 25bfb2d767
1 file changed
+3 -1
+3 -1
View File
@@ -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();