Closed
Bug 299273
Opened 20 years ago
Closed 19 years ago
xforms-select and xforms-deselect events not firing for selects
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stpride, Assigned: doronr)
References
()
Details
(Keywords: fixed1.8.0.2, fixed1.8.1)
Attachments
(4 files, 3 obsolete files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050509 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050509 Firefox/1.0.4
The xforms-select and xforms-deselect events are not firing.
Reproducible: Always
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
Correct testcase - previous one had wrong xforms namespace prefix.
Updated•20 years ago
|
Attachment #187833 -
Attachment is obsolete: true
Comment 3•20 years ago
|
||
Yes, select's do not dispatch these yet. For select1 this depends on bug 281668.
Should we XBL'ize select too, or implement the support in the current code?
Status: UNCONFIRMED → NEW
Depends on: 281668
Ever confirmed: true
Summary: xforms-select and xforms-deselect events not firing → xforms-select and xforms-deselect events not firing for selects
| Assignee | ||
Comment 4•20 years ago
|
||
| Assignee | ||
Comment 5•20 years ago
|
||
Not sure where to put this in the select1 code
Comment on attachment 199847 [details] [diff] [review]
le patch
check out the testcase I'm about to attach. Assuming I'm right, your patch
doesn't process it right. I believe that in @incremental="false", we should
still do the xforms-select and xforms-deselect and not wait for the blur.
Also, this doesn't seem to be remembering the initial selection state. If an
item is pre-selected and then I deselect it, no event.
Attachment #199847 -
Flags: review?(aaronr) → review-
added an input element to make sure that changing the value via another control
gave the right event sequence. Sent a note off to Novell to see if my testcase
is right, but I think it is.
Attachment #199878 -
Attachment is obsolete: true
| Assignee | ||
Comment 9•20 years ago
|
||
Note that the testcase is "invalid" - alerts cause an alert, which will steal
focus and cause the value-changed of the select to happen.
Attachment #199847 -
Attachment is obsolete: true
| Assignee | ||
Updated•20 years ago
|
Attachment #199965 -
Flags: review?(aaronr)
Comment 10•20 years ago
|
||
Comment on attachment 199965 [details] [diff] [review]
fixes non-incremental select
>Index: extensions/xforms/resources/content/select.xml
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/select.xml,v
>retrieving revision 1.3
>diff -w -u -1 -0 -r1.3 select.xml
>--- extensions/xforms/resources/content/select.xml 5 Oct 2005 16:17:48 -0000 1.3
>+++ extensions/xforms/resources/content/select.xml 18 Oct 2005 19:25:27 -0000
options[i].control.QueryInterface(Components.interfaces.nsIXFormsSelectChild).value;
>+
>+ // if it wasn't selected before add to the list of newly selected items
>+ if (!options[i].wasSelected) {
>+ newSelectedControls.push(options[i].control);
>+ }
>+
>+ options[i].wasSelected = true;
>+ } else {
>+ // it was selected before, but now unselected
>+ if (options[i].wasSelected) {
>+ this.dispatchSelectEvent(options[i].control, "xforms-deselect")
> }
>+
>+ options[i].wasSelected = false;
>+ }
>+ }
nit: Please fix curly braces alignment problem.
Attachment #199965 -
Flags: review?(aaronr) → review+
Comment 11•20 years ago
|
||
(In reply to comment #10)
> (From update of attachment 199965 [details] [diff] [review] [edit])
> >Index: extensions/xforms/resources/content/select.xml
> >===================================================================
> >RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/select.xml,v
> >retrieving revision 1.3
> >diff -w -u -1 -0 -r1.3 select.xml
> >--- extensions/xforms/resources/content/select.xml 5 Oct 2005 16:17:48 -0000 1.3
> >+++ extensions/xforms/resources/content/select.xml 18 Oct 2005 19:25:27 -0000
>
> options[i].control.QueryInterface(Components.interfaces.nsIXFormsSelectChild).value;
> >+
> >+ // if it wasn't selected before add to the list of newly selected items
> >+ if (!options[i].wasSelected) {
> >+ newSelectedControls.push(options[i].control);
> >+ }
> >+
> >+ options[i].wasSelected = true;
> >+ } else {
> >+ // it was selected before, but now unselected
> >+ if (options[i].wasSelected) {
> >+ this.dispatchSelectEvent(options[i].control, "xforms-deselect")
> > }
> >+
> >+ options[i].wasSelected = false;
> >+ }
> >+ }
>
> nit: Please fix curly braces alignment problem.
>
Also be nice if you could figure out a way to keep dispatchSelectEvent common between select and select1.
| Assignee | ||
Comment 12•20 years ago
|
||
Attachment #200915 -
Flags: review?(smaug)
| Assignee | ||
Updated•20 years ago
|
Attachment #199965 -
Flags: review?(smaug)
Comment 13•20 years ago
|
||
Comment on attachment 199965 [details] [diff] [review]
fixes non-incremental select
Same comments what Aaron had. Though, not sure what to do with dispatchSelectEvent.
Attachment #199965 -
Flags: review?(smaug) → review+
Updated•20 years ago
|
Attachment #200915 -
Flags: review?(smaug) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #200915 -
Flags: review?(aaronr)
Attachment #200915 -
Flags: review?(aaronr) → review+
| Assignee | ||
Comment 14•20 years ago
|
||
checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Comment 15•20 years ago
|
||
needs to stay open until it is on the branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 16•20 years ago
|
||
its not goona be in 1.8 branch
Comment 17•20 years ago
|
||
probly wont be anymore checkins for branch
Comment 18•19 years ago
|
||
checked into MOZILLA_1_8_BRANCH via bug 323691. Leaving open for now until it gets into 1.8.0
Updated•19 years ago
|
Whiteboard: xf-to-branch
Updated•19 years ago
|
Status: REOPENED → RESOLVED
Closed: 20 years ago → 19 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•