Bug 1564094 - Follow-up: With history enabled, check that back/forward buttons are there. r=aceman

This commit is contained in:
Jorg K 2019-07-14 00:09:48 +02:00
Родитель a631637b6d
Коммит cb812d60ea
1 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -572,15 +572,19 @@ ViewSourceChrome.prototype = {
let backCommand = document.getElementById("Browser:Back");
let forwardCommand = document.getElementById("Browser:Forward");
if (this.webNav.canGoBack) {
backCommand.removeAttribute("disabled");
} else {
backCommand.setAttribute("disabled", "true");
if (backCommand) {
if (this.webNav.canGoBack) {
backCommand.removeAttribute("disabled");
} else {
backCommand.setAttribute("disabled", "true");
}
}
if (this.webNav.canGoForward) {
forwardCommand.removeAttribute("disabled");
} else {
forwardCommand.setAttribute("disabled", "true");
if (forwardCommand) {
if (this.webNav.canGoForward) {
forwardCommand.removeAttribute("disabled");
} else {
forwardCommand.setAttribute("disabled", "true");
}
}
},