Bug 927911: Don't try to attach SelectionHandler carets to disabled input elements, r=margaret

This commit is contained in:
Mark Capella 2013-10-18 01:28:17 -04:00
Родитель 9deb76cc82
Коммит 5fc9f0a5b9
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -4305,10 +4305,11 @@ var BrowserEventHandler = {
this._sendMouseEvent("mousedown", element, x, y);
this._sendMouseEvent("mouseup", element, x, y);
// See if its a input element
if ((element instanceof HTMLInputElement && element.mozIsTextField(false)) ||
(element instanceof HTMLTextAreaElement))
SelectionHandler.attachCaret(element);
// See if its an input element, and it isn't disabled
if (!element.disabled &&
((element instanceof HTMLInputElement && element.mozIsTextField(false)) ||
(element instanceof HTMLTextAreaElement)))
SelectionHandler.attachCaret(element);
// scrollToFocusedInput does its own checks to find out if an element should be zoomed into
BrowserApp.scrollToFocusedInput(BrowserApp.selectedBrowser);