Implement forminput event




DOM: Core & HTML
7 years ago
5 years ago


(Reporter: Alexander Farkas, Unassigned)


(Blocks: 1 bug, {html5})


Firefox Tracking Flags

(Not tracked)




7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: Gecko/20100914 Firefox/3.6.10
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: 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


7 years ago
Blocks: 344614
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:
  <input name='a'>
  <input name='b'>
  <output onforminput="your_stuff();"></output>

You will have to do:
  <script>function updateOutput() { your_stuff(); }</script>
  <input name='a' oninput="updateOutput();">
  <input name='b' oninput="updateOutput();">
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.

Comment 3

7 years ago

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):

	<input name='a'>
	<input name='b'>

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

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 @ 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:
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.
Last Resolved: 7 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.