Closed Bug 164481 Opened 22 years ago Closed 21 years ago

Fix gecko to correctly call preventDefault on form element events

Categories

(Camino Graveyard :: Page Layout, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Chimera0.6

People

(Reporter: sfraser_bugs, Assigned: Brade)

Details

Attachments

(1 file)

I often see this while browsing/using forms (haven't got a test case, but it's
quite common):

2002-08-24 22:26:33.340 Navigator[393] *** -[ChildView insertNewline:]: selector
not recognized

2002-08-24 22:26:33.341 Navigator[393] *** NSTimer ignoring exception
'NSInvalidArgumentException' (reason '*** -[ChildView insertNewline:]: selector
not recognized') that raised during posting of timer with target 3975110 and
selector 'insertNewline:'

We should probably fix this. 'insertNewline' is an NSResponder selector.
Status: NEW → ASSIGNED
Target Milestone: --- → Chimera0.6
including current behavior in summary
Summary: -[ChildView insertNewline:]: selector not recognized exceptions → beep when pressing return to submit form [was: -[ChildView insertNewline:]: selector not recognized exceptions]
I fixed this yesterday.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
reopening this bug to fix the underlying problem (and not simply masking it)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
note: there may be other cases where we need to do this; these are the ones I
could trigger and see that we needed to mark the event

These things were tested:
  key	  focus on
return	  link
space	  radio button
space	  checkbox
return	  button (default submit button and other button)
up/down   list
pageUp/Dn list
Home/End  list
return	  radio button
return	  list (already working correctly?)
escape	  list (already working correctly?)
mozilla bug for trunk is covered with bug 172174
Status: REOPENED → ASSIGNED
cc bryner for event stuff.
I don't get it, why would chimera need this when no other embedding clients need
this? This seems like the wrong thing to do IMO...

Cc:ing jkeiser who has worked on the form event code before...
> I don't get it, why would chimera need this when no other embedding clients need
> this?

Because of the way the cocoa widget code handles events. It first passes them
into gecko. If gecko says that it doesn't handle them, it then calls cocoa
methods that try to match the key combo with system-defined shortcuts (e.g.
Command-left -> moveToBeginningOfLine, Return -> insertNewline). If the key
combo is matched to a shortcut, but there is no implementation of the shortcut,
then cocoa beeps.

So these changes are needed so that gecko does not lie about whether it handled
the event.
Comment on attachment 101428 [details] [diff] [review]
chimera patch for preventing default (or consuming event)

r=jkeiser for Chimera branch ... I think this misses events but as brade points
out we can catch that on trunk.
Attachment #101428 - Flags: review+
Adjust summary, since the original problem is fixed.
Summary: beep when pressing return to submit form [was: -[ChildView insertNewline:]: selector not recognized exceptions] → Fix gecko to correctly call preventDefault on form element events
Please update.
resolving as fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: