From 25bfb2d767da8920a5488ab09015536df571ee89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 20 Jun 2019 23:16:56 +0200 Subject: [PATCH] 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 --- src/tab.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tab.js b/src/tab.js index a87b89c51b..5e9f69cbf6 100644 --- a/src/tab.js +++ b/src/tab.js @@ -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();