Implement forminput event

RESOLVED WONTFIX

Status

()

Core
DOM: Core & HTML
--
enhancement
RESOLVED WONTFIX
7 years ago
4 years ago

People

(Reporter: Alexander Farkas, Unassigned)

Tracking

(Blocks: 1 bug, {html5})

Trunk
html5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

You have recently implemented the output element (#346485). But it seems, that you didn't add the forminput-event. I haven't seen an issue for implementing this event @ #344614. Due to the fact, that the output element is quit unsuable without forminvalid-event, it would be good to add.

Reproducible: Always
(Reporter)

Updated

7 years ago
Blocks: 344614
Status: UNCONFIRMED → NEW
Component: General → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
Summary: implement and track forminput event → Implement forminput event
Version: unspecified → Trunk
Keywords: dev-doc-needed, html5
I understand forminput event might be very helpful but I think <output> is still usable without it. It's just a bit more annoying.

Instead of:
<form>
  <input name='a'>
  <input name='b'>
  <output onforminput="your_stuff();"></output>
</form>

You will have to do:
<form>
  <script>function updateOutput() { your_stuff(); }</script>
  <input name='a' oninput="updateOutput();">
  <input name='b' oninput="updateOutput();">
  <output></output>
</form>
This said, I understand that life would be easier with onforminput but with the feature freeze, it might be hard to add that for Firefox 4/Gecko 2.0.
(Reporter)

Comment 3

7 years ago
@Mounir

No problem. I already said, that I like the current implementation of HTML5 form features in FF4 (It has less features, than others, but is a lot more consistent and compiliant).

BTW: You can make the input event behave similiar to the forminput, by setting the useCapture argument in addEventListener to true and adding it on an ancestor of the input elements (i.e.: form):

<form>
	<input name='a'>
	<input name='b'>
	<output></output>
	
</form>

<script>
	function updateOutput() { your_stuff(); }
	document.getElementsByTagName("form")[0].addEventListener("input", updateOutput, true);
</script>

My only problem is, how can I feature detect, wether a browser has implemented this feature. I thought, every browser, wich has implemented output will also implement forminput, but this assumption isn't true anymore. The script @ http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ doesn't work with input event in firefox 3.0-4.0 and I don't think would work with forminput in an upcomming release of FF 4.5/5.0. Have you any ideas?

Comment 4

7 years ago
There is currently a discussion about removing forminput and formchange from the spec since they are such an edge case that can easily be solved with capturing event listeners.
W3C bug:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11129
For information, the W3C bug has been marked WONTFIX. We might add onform* events for the next Firefox release (after Firefox 4).
Finally, the bug has been resolved on the w3c side. This one is going to be marked WONTFIX then.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
Will not require docs since spec has wontfixed this.
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.