Closed
Bug 294676
Opened 19 years ago
Closed 19 years ago
Alerts firing for valid ancestors
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: smaug)
References
Details
Attachments
(1 file, 3 obsolete files)
1.94 KB,
patch
|
aaronr
:
review+
doronr
:
review+
|
Details | Diff | Splinter Review |
An alert should only show itself when it's parent element is invalid and then only once. We currently have a problem where we are attaching a listener to the parent element looking for xforms-invalid events, but we don't test to make sure that the xforms-invalid is only targeted at our parent element. So right now if we put an alert on a valid group, for example, and it has an invalid child, the group's alert will fire. Testcase and patch coming.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
help should also not be triggered for group. The 'hint' is tougher to determine by sight since the input is contained in a group so maybe the hint should show even if you move the mouse over the input.
Attachment #183917 -
Attachment is obsolete: true
Assignee | ||
Comment 3•19 years ago
|
||
very quickly made patch. Hopefully I catched all the cases.
Attachment #183940 -
Flags: review?(aaronr)
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 183933 [details]
also shows help triggered incorrectly
The help should be seen.
invalid
Attachment #183933 -
Attachment is obsolete: true
Assignee | ||
Comment 5•19 years ago
|
||
Added few comments and stopPropagation also for xforms-hint.
Assignee: aaronr → smaug
Attachment #183940 -
Attachment is obsolete: true
Attachment #183945 -
Flags: review?(aaronr)
Assignee | ||
Updated•19 years ago
|
Attachment #183940 -
Flags: review?(aaronr)
Comment on attachment 183945 [details] [diff] [review] v2 dandy!
Attachment #183945 -
Flags: review?(aaronr) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #183945 -
Flags: review?(doronr)
Comment 7•19 years ago
|
||
Comment on attachment 183945 [details] [diff] [review] v2 >? dependentLibs.h >Index: nsXFormsMessageElement.cpp >=================================================================== >RCS file: /cvsroot/mozilla/extensions/xforms/nsXFormsMessageElement.cpp,v >retrieving revision 1.5 >diff -u -8 -p -r1.5 nsXFormsMessageElement.cpp >--- nsXFormsMessageElement.cpp 17 May 2005 20:04:08 -0000 1.5 >+++ nsXFormsMessageElement.cpp 18 May 2005 21:03:00 -0000 >@@ -379,27 +379,50 @@ nsXFormsMessageElement::ParentChanged(ns > > NS_IMETHODIMP > nsXFormsMessageElement::HandleAction(nsIDOMEvent* aEvent, > nsIXFormsActionElement *aParentAction) > { > if (!mElement) > return NS_OK; > >+ if (mType != eType_Normal) { >+ nsCOMPtr<nsIDOMEventTarget> target; >+ >+ if (mType == eType_Alert) { >+ // Alert should fire only if target is the parent element. >+ aEvent->GetTarget(getter_AddRefs(target)); >+ } else { >+ // If <help> or <hint> is inside <action>, we don't want to fire them, >+ // unless xforms-help/xforms-hint is dispatched to the <action>. >+ aEvent->GetCurrentTarget(getter_AddRefs(target)); >+ } >+ nsCOMPtr<nsIDOMNode> targetNode(do_QueryInterface(target)); >+ nsCOMPtr<nsIDOMNode> parent; >+ mElement->GetParentNode(getter_AddRefs(parent)); >+ if (!parent || targetNode != parent) >+ return NS_OK; >+ } Won't hint/help stop the event from propogating, so that when ever you see one, you should show it?
Attachment #183945 -
Flags: review?(doronr) → review+
Assignee | ||
Comment 8•19 years ago
|
||
>
> Won't hint/help stop the event from propogating, so that when ever you see one,
> you should show it?
>
No, if <hint>/<help> is inside <action>
Assignee | ||
Comment 9•19 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•