diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index e66fdedac1c1..aa211de5250d 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1753,6 +1753,12 @@ nsXULElement::ClickWithInputSource(uint16_t aInputSource, bool aIsTrustedEvent) status = nsEventStatus_eIgnore; // reset status EventDispatcher::Dispatch(static_cast(this), context, &eventClick, nullptr, &status); + + // If the click has been prevented, lets skip the command call + // this is how a physical click works + if (status == nsEventStatus_eConsumeNoDefault) { + return NS_OK; + } } } diff --git a/dom/xul/test/chrome.ini b/dom/xul/test/chrome.ini index 7be1b6343b74..17d73fac3185 100644 --- a/dom/xul/test/chrome.ini +++ b/dom/xul/test/chrome.ini @@ -38,3 +38,4 @@ support-files = skip-if = os == "android" [test_bug1069772.xul] skip-if = os == "android" +[test_bug1290965.xul] diff --git a/dom/xul/test/test_bug1290965.xul b/dom/xul/test/test_bug1290965.xul new file mode 100644 index 000000000000..8701b55be5e5 --- /dev/null +++ b/dom/xul/test/test_bug1290965.xul @@ -0,0 +1,39 @@ + + + + +