Bug 636339 - Disabled arrows for form assistant on Android [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-05-20 12:18:19 +02:00
parent 50da2650a3
commit 4927633914

View File

@ -688,15 +688,20 @@ var FormHelperUI = {
this._currentBrowser = Browser.selectedBrowser;
this._currentCaretRect = null;
#ifndef ANDROID
// Update the next/previous commands
this._cmdPrevious.setAttribute("disabled", !aHasPrevious);
this._cmdNext.setAttribute("disabled", !aHasNext);
// If both next and previous are disabled don't bother showing arrows
if (!aHasNext && !aHasPrevious)
this._container.setAttribute("disabled", "true");
else
if (aHasNext || aHasPrevious)
this._container.removeAttribute("disabled");
else
this._container.setAttribute("disabled", "true");
#else
// Always hide the arrows on Android
this._container.setAttribute("disabled", "true");
#endif
this._open = true;