Open Bug 163269 Opened 19 years ago Updated 12 years ago

Make form controls not override HandleDOMEvent

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Linux
defect

Tracking

()

ASSIGNED
mozilla1.4alpha

People

(Reporter: john, Assigned: john)

References

Details

Form controls currently override HandleDOMEvent to process certain events and
this makes the code more complicated and error-prone.  There are several options:

(1) Make form controls be listeners on themselves
(2) Make the document receive the event and look at the type of the target
(3) Add a DefaultAction() method that is called on every element in a separate
stage in HandleDOMEvent()
(4) Make a special listener that listens for certain events on all elements and
calls DefaultAction on elements when this happens

#1 is bloat, #2 seems messy to me, and #3 joki didn't like when I last talked to
him.  #4 doesn't mess up HandleDOMEvent but does the same thing as #3; perhaps
it's worth looking into.
Status: NEW → ASSIGNED
One more complete plan is to have elements be receivers of events (like through
DefaultEvent() or HandleEvent() or something) and *not* dispatchers.  Have ESM
or somebody else do the dispatching, bubbling, capturing, etc.

bryner has expressed an interest in this idea as well.  Probably there will be a
bigger metabug to address that issue.
Priority: -- → P3
Target Milestone: --- → mozilla1.4alpha
Depends on: 185758
QA Contact: tpreston → layout.form-controls
You need to log in before you can comment on or make changes to this bug.