зеркало из https://github.com/mozilla/gecko-dev.git
Bug 982189 - Fix Input type="number" immutability. r=jst
This commit is contained in:
Родитель
ca1c5aecfa
Коммит
b032f1eb92
|
@ -3919,7 +3919,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||
// the editor's handling of up/down keypress events. For that reason we
|
||||
// just ignore aVisitor.mEventStatus here and go ahead and handle the
|
||||
// event to increase/decrease the value of the number control.
|
||||
if (!aVisitor.mEvent->mFlags.mDefaultPreventedByContent) {
|
||||
if (!aVisitor.mEvent->mFlags.mDefaultPreventedByContent && IsMutable()) {
|
||||
StepNumberControlForUserEvent(keyEvent->keyCode == NS_VK_UP ? 1 : -1);
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
@ -4145,7 +4145,8 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||
nsNumberControlFrame* numberControlFrame =
|
||||
do_QueryFrame(GetPrimaryFrame());
|
||||
if (numberControlFrame) {
|
||||
if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN) {
|
||||
if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN &&
|
||||
IsMutable()) {
|
||||
switch (numberControlFrame->GetSpinButtonForPointerEvent(
|
||||
aVisitor.mEvent->AsMouseEvent())) {
|
||||
case nsNumberControlFrame::eSpinButtonUp:
|
||||
|
|
Загрузка…
Ссылка в новой задаче