mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990473 - Check parent input for action hint if focus is in anonymous subtree; r=masayuki r=smaug
This commit is contained in:
parent
1af57c9f58
commit
10b7761dfc
@ -767,10 +767,16 @@ IMEStateManager::SetIMEState(const IMEState& aState,
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::moz_action_hint,
|
||||
context.mActionHint);
|
||||
|
||||
// if we don't have an action hint and return won't submit the form use "next"
|
||||
if (context.mActionHint.IsEmpty() && aContent->Tag() == nsGkAtoms::input) {
|
||||
// Get the input content corresponding to the focused node,
|
||||
// which may be an anonymous child of the input content.
|
||||
nsIContent* inputContent = aContent->FindFirstNonChromeOnlyAccessContent();
|
||||
|
||||
// If we don't have an action hint and
|
||||
// return won't submit the form, use "next".
|
||||
if (context.mActionHint.IsEmpty() &&
|
||||
inputContent->Tag() == nsGkAtoms::input) {
|
||||
bool willSubmit = false;
|
||||
nsCOMPtr<nsIFormControl> control(do_QueryInterface(aContent));
|
||||
nsCOMPtr<nsIFormControl> control(do_QueryInterface(inputContent));
|
||||
mozilla::dom::Element* formElement = control->GetFormElement();
|
||||
nsCOMPtr<nsIForm> form;
|
||||
if (control) {
|
||||
|
Loading…
Reference in New Issue
Block a user