Closed
Bug 302027
Opened 19 years ago
Closed 19 years ago
input element doesn't dispatch DOMActivate event
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stpride, Assigned: jhpedemonte)
Details
Attachments
(3 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050725 Firefox/1.0+ Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050725 Firefox/1.0+ Implementing the example in the spec (9.2.1: The switch Element) fails. Reproducible: Always
| Reporter | ||
Comment 1•19 years ago
|
||
| Assignee | ||
Comment 2•19 years ago
|
||
Actually, the problem here is that the <xforms:input> doesn't fire a DOMActivate event. Changing summary accordingly.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: DOMActivate not working for switch/case → input element doesn't dispatch DOMActivate event
| Assignee | ||
Updated•19 years ago
|
Assignee: aaronr → jhpedemonte
Status: ASSIGNED → NEW
| Assignee | ||
Comment 3•19 years ago
|
||
The <xforms:input> element sits on top of the <html:input> element. But it seems that the <html:input> element won't fire a DOMActivate event on the 'Enter' keypress unless it is inside of <html:form> element. This patch adds code to xforms.xml in order to dispatch the event. I also made it so "xformswidget-input-boolean" ignores the 'Enter' keypress.
Attachment #190479 -
Flags: review?(aaronr)
Comment 4•19 years ago
|
||
Comment on attachment 190479 [details] [diff] [review] patch >+ onkeypress="if (event.keyCode == 13) this.parentNode.dispatchDOMActivate();" I'd prefer "if (event.keyCode == event.DOM_VK_RETURN) .... "
| Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 190479 [details] [diff] [review] patch Quite right, smaug. Since you already took a look, do you mind giving me an 'official' review?
Attachment #190479 -
Flags: review?(smaug)
Comment on attachment 190479 [details] [diff] [review] patch like smaug mentioned, replace that hard coded 13 with the appropriate define. Otherwise looks good. r=me
Attachment #190479 -
Flags: review?(aaronr) → review+
Comment 7•19 years ago
|
||
Comment on attachment 190479 [details] [diff] [review] patch change the '13' and r=me
Attachment #190479 -
Flags: review?(smaug) → review+
| Assignee | ||
Comment 8•19 years ago
|
||
Checked in to trunk. ->FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 9•19 years ago
|
||
Huh. Now we have two identical dispatchDOMActivate() functions in xforms.xml, one for xforms-trigger-base and xforms-input. Couldn't this be a function on xformswidget-base?
| Assignee | ||
Comment 10•19 years ago
|
||
Quite right. Don't know how I missed it. So this patch just moves the |dispatchDOMActivate| method to xformswidget-base, and removes the other references.
Attachment #190765 -
Flags: review?(allan)
Comment 11•19 years ago
|
||
Comment on attachment 190765 [details] [diff] [review] use common method kill trigger-base too, it's not needed anymore
Attachment #190765 -
Flags: review?(allan) → review-
| Assignee | ||
Comment 12•19 years ago
|
||
Cool, I didn't know what to do with |xformswidget-trigger-base|, if it was needed for another reason or if it could just be removed. So this patch removes it entirely, and make |xformswidget-trigger-minimal| extend |xformswidget-base| instead.
Attachment #190765 -
Attachment is obsolete: true
Attachment #190957 -
Flags: review?(allan)
Comment 13•19 years ago
|
||
Comment on attachment 190957 [details] [diff] [review] use common method v2 (In reply to comment #12) > Cool, I didn't know what to do with |xformswidget-trigger-base|, if it was > needed for another reason or if it could just be removed. So this patch > removes it entirely, and make |xformswidget-trigger-minimal| extend > |xformswidget-base| instead. That's the trick. r=me
Attachment #190957 -
Flags: review?(allan) → review+
| Assignee | ||
Updated•19 years ago
|
Attachment #190957 -
Flags: review?(doronr)
Updated•19 years ago
|
Attachment #190957 -
Flags: review?(doronr) → review+
| Reporter | ||
Comment 14•19 years ago
|
||
Actually, the original problem still exists (i.e., doesn't switch case when focus out of input box - see testcase). Should this bug be reopened, or a new bug be opened?
| Assignee | ||
Comment 15•19 years ago
|
||
Stephen, that behavior relies on the DOMFocusOut event, which is discussed in bug 299379.
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
•