diff --git a/content/html/content/src/HTMLInputElement.cpp b/content/html/content/src/HTMLInputElement.cpp index 0c597a092635..8e1ba6c331ab 100644 --- a/content/html/content/src/HTMLInputElement.cpp +++ b/content/html/content/src/HTMLInputElement.cpp @@ -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: