Bug 1620778 - Fix interaction of up/down keys with autocomplete and <input type=number>. r=masayuki,smaug
Differential Revision: https://phabricator.services.mozilla.com/D66011
This commit is contained in:
@@ -950,6 +950,15 @@ TextInputListener::HandleEvent(Event* aEvent) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
{
|
||||
auto* input = HTMLInputElement::FromNode(mTxtCtrlElement);
|
||||
if (input && input->StepsInputValue(*widgetKeyEvent)) {
|
||||
// As an special case, don't handle key events that would step the value
|
||||
// of our <input type=number>.
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
KeyEventHandler* keyHandlers = ShortcutKeys::GetHandlers(
|
||||
mTxtCtrlElement->IsTextArea() ? HandlerType::eTextArea
|
||||
: HandlerType::eInput);
|
||||
|
||||
Reference in New Issue
Block a user