Bug 1373570 - Focus the update button in about dialog once there is one visible.
MozReview-Commit-ID: JFokKUdDAaY
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -61,16 +61,22 @@ function init(aEvent) {
relNotesLink.href = relNotesURL;
relNotesLink.hidden = false;
}
}
if (AppConstants.MOZ_UPDATER) {
gAppUpdater = new appUpdater();
+ let button = gAppUpdater.updateDeck.selectedPanel.querySelector("button");
+ if (button && (!document.commandDispatcher.focusedElement || // don't steal the focus
+ document.commandDispatcher.focusedElement.localName == "button")) { // except from the other buttons
+ button.focus();
+ }
+
let channelLabel = document.getElementById("currentChannel");
let currentChannelText = document.getElementById("currentChannelText");
channelLabel.value = UpdateUtils.UpdateChannel;
if (/^release($|\-)/.test(channelLabel.value))
currentChannelText.hidden = true;
}
if (AppConstants.platform == "macosx") {