Skip to content

Commit

Permalink
Fix regression with undesired disabled globe button
Browse files Browse the repository at this point in the history
If the usemaps panel was visible and you did not click on a map item,
but somewhere else, the panel was hidden as usual, but the globe button
was disabled although the tab still contained the same supported map.
This wasn't caused by setShowmapButtonState(), this function was not
invoked. For some reason the global shomwapButton.disabled state was
used (the bad behavior didn't occur when changing it to true in
setShowmapButtonState()).

Setting the disabled state tab- instead of window-specific fixes this
issue.

Regression introduced in commit af45e76 (Enable/disable the globe button
separately for each browser window, 2018-12-21).
  • Loading branch information
marcows committed Dec 22, 2018
1 parent ff27eff commit 620b10d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ function createUsemapsPanel()
function updateShowmapButtonState()
{
if (geourl.parse(tabs.activeTab.url)) {
showmapButton.state("window", {
showmapButton.state("tab", {
disabled: false
});
} else {
showmapButton.state("window", {
showmapButton.state("tab", {
disabled: true
});
usemapsPanel.hide();
Expand Down

0 comments on commit 620b10d

Please sign in to comment.