diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp index 30e099907cd1..29032ec08d3b 100644 --- a/toolkit/components/satchel/nsFormFillController.cpp +++ b/toolkit/components/satchel/nsFormFillController.cpp @@ -789,7 +789,7 @@ nsFormFillController::HandleEvent(Event* aEvent) { case eKeyPress: return KeyPress(aEvent); case eEditorInput: { - nsCOMPtr input = do_QueryInterface(aEvent->GetTarget()); + nsCOMPtr input = do_QueryInterface(aEvent->GetComposedTarget()); if (!IsTextControl(input)) { return NS_OK; } @@ -927,7 +927,7 @@ void nsFormFillController::MaybeStartControllingInput( } nsresult nsFormFillController::Focus(Event* aEvent) { - nsCOMPtr input = do_QueryInterface(aEvent->GetTarget()); + nsCOMPtr input = do_QueryInterface(aEvent->GetComposedTarget()); MaybeStartControllingInput(HTMLInputElement::FromNodeOrNull(input)); // Bail if we didn't start controlling the input. @@ -1094,7 +1094,7 @@ nsresult nsFormFillController::MouseDown(Event* aEvent) { return NS_ERROR_FAILURE; } - nsCOMPtr targetNode = do_QueryInterface(aEvent->GetTarget()); + nsCOMPtr targetNode = do_QueryInterface(aEvent->GetComposedTarget()); if (!HTMLInputElement::FromNodeOrNull(targetNode)) { return NS_OK; } diff --git a/toolkit/components/satchel/test/mochitest.ini b/toolkit/components/satchel/test/mochitest.ini index 4d296cb2e401..f51aefdb6fa5 100644 --- a/toolkit/components/satchel/test/mochitest.ini +++ b/toolkit/components/satchel/test/mochitest.ini @@ -11,6 +11,7 @@ skip-if = os == 'linux' # bug 1022386 [test_bug_787624.html] skip-if = os == 'linux' # bug 1022386 [test_datalist_with_caching.html] +[test_datalist_shadow_dom.html] [test_form_autocomplete.html] skip-if = (verify && debug && (os == 'win')) || os == 'linux' # linux - bug 1022386 [test_form_autocomplete_with_list.html] diff --git a/toolkit/components/satchel/test/test_datalist_shadow_dom.html b/toolkit/components/satchel/test/test_datalist_shadow_dom.html new file mode 100644 index 000000000000..52c681ce1f27 --- /dev/null +++ b/toolkit/components/satchel/test/test_datalist_shadow_dom.html @@ -0,0 +1,124 @@ + + + + Test for datalist in Shadow DOM + + + + + + + +

+
+
+
+ +
+
+
+ +