Bug 611893 - The form helper up arrow is incorrectly enabled on Google.com [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2010-11-17 22:37:04 +01:00
Родитель a2892c4573
Коммит 1a378c4275
2 изменённых файлов: 3 добавлений и 4 удалений

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

@ -1523,8 +1523,8 @@
// buttons attributes sync with commands doesn not look updated when
// we dynamically switch the "command" attribute so we need to ensure
// the disabled state of the buttons is right when switching commands
this._previousButton.disabled = document.getElementById(aModel.commands.previous).disabled;
this._nextButton.disabled = document.getElementById(aModel.commands.next).disabled;
this._previousButton.disabled = document.getElementById(aModel.commands.previous).getAttribute("disabled") == "true";
this._nextButton.disabled = document.getElementById(aModel.commands.next).getAttribute("disabled") == "true";
this.model = aModel;
this.contentHasChanged();

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

@ -1859,11 +1859,10 @@ var FormHelperUI = {
},
show: function formHelperShow(aElement, aHasPrevious, aHasNext) {
this._open = true;
// Update the next/previous commands
this._cmdPrevious.setAttribute("disabled", !aHasPrevious);
this._cmdNext.setAttribute("disabled", !aHasNext);
this._open = true;
let lastElement = this._currentElement || null;
this._currentElement = {