From 51505e96dac99224984f9da6c802c8e2b1462e62 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 14 Jan 2011 15:03:39 +0200 Subject: [PATCH] Bug 623291 - Firefox 4: change/blur event are not dispatched to input upon button click, r=enn, a=blocking --HG-- extra : rebase_source : 3866a4ba1cfd9721a43c1c1fedeba2f6ed3c80d6 --- .../html/content/src/nsHTMLButtonElement.cpp | 2 +- content/html/content/test/Makefile.in | 1 + content/html/content/test/test_bug623291.html | 47 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 content/html/content/test/test_bug623291.html diff --git a/content/html/content/src/nsHTMLButtonElement.cpp b/content/html/content/src/nsHTMLButtonElement.cpp index f50b0dc8f3a4..a580b6fafa5c 100644 --- a/content/html/content/src/nsHTMLButtonElement.cpp +++ b/content/html/content/src/nsHTMLButtonElement.cpp @@ -447,7 +447,7 @@ nsHTMLButtonElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor) if (fm) fm->SetFocus(this, nsIFocusManager::FLAG_BYMOUSE | nsIFocusManager::FLAG_NOSCROLL); - aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault; + aVisitor.mEvent->flags |= NS_EVENT_FLAG_PREVENT_ANCHOR_ACTIONS; } else if (static_cast(aVisitor.mEvent)->button == nsMouseEvent::eMiddleButton || static_cast(aVisitor.mEvent)->button == diff --git a/content/html/content/test/Makefile.in b/content/html/content/test/Makefile.in index c3ae3f247cc8..a95c3ecc816c 100644 --- a/content/html/content/test/Makefile.in +++ b/content/html/content/test/Makefile.in @@ -250,6 +250,7 @@ _TEST_FILES = \ test_bug601030.html \ test_bug610687.html \ test_bug618948.html \ + test_bug623291.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/content/html/content/test/test_bug623291.html b/content/html/content/test/test_bug623291.html new file mode 100644 index 000000000000..b0af6efc56b3 --- /dev/null +++ b/content/html/content/test/test_bug623291.html @@ -0,0 +1,47 @@ + + + + + Test for Bug 623291 + + + + + + +Mozilla Bug 623291 +

+ + + + +
+
+
+ +