Closed
Bug 261108
Opened 21 years ago
Closed 21 years ago
using <enter> to submit a form triggers Warning ``reference to undefined property event.button'' [xs] in file ``chrome://communicator/content/contentAreaClick.js'', line 189, character 0.
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: timeless, Assigned: neil)
Details
(Keywords: fixed-aviary1.0, fixed1.7.5)
Attachments
(1 file, 1 obsolete file)
828 bytes,
patch
|
jst
:
review+
jst
:
superreview+
brendan
:
approval-aviary+
brendan
:
approval1.7.5+
brendan
:
approval1.8a4-
|
Details | Diff | Splinter Review |
Warning ``reference to undefined property event.button'' [xs] in file
``chrome://communicator/content/contentAreaClick.js'', line 189, character 0.
// Called whenever the user clicks in the content area,
172 // except when left-clicking on links (special case)
173 // should always return true for click to go through
174 function contentAreaClick(event)
- 175 {
- 176 var isKeyPress = (event.type == "keypress");
- 177 var href = hrefForClickEvent(event);
- 178 if (href) {
- 179 if (isKeyPress) {
- 180 openNewTabWith(href, true, event.shiftKey);
- 181 event.preventBubble();
182 }
183 else {
- 184 handleLinkClick(event, href, null);
185 }
- 186 return true;
187 }
188
- 189 if (pref && !isKeyPress && event.button == 1 &&
- 190
#0: function contentAreaClick(event=UIEvent:{0}) in
<chrome://communicator/content/contentAreaClick.js> line 189
#1: function onclick(event=UIEvent:{0}) in
<chrome://navigator/content/navigator.xul> line 1
0001: event instanceof Components.interfaces.nsIDOMMouseEvent
$[1] = [boolean] false
0001: event.type
$[2] = [string] "click"
enter triggered submits are evil magical creatures that pretend to be clicks but
aren't.
the question is, should they be real click events, or should i change 176 to use
!(event instanceof Components.interfaces.nsIDOMMouseEvent).
I'm presuming the latter, hence the assignment and component, however if dom
wants to change, then i'm willing to do that too...
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040922
Assignee | ||
Comment 2•21 years ago
|
||
Assignee | ||
Comment 3•21 years ago
|
||
Everyone else creates an nsMouseEvent, this must have been an oversight.
Assignee: timeless → neil.parkwaycc.co.uk
Attachment #159833 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Component: XP Apps: GUI Features → DOM: Events
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 159834 [details] [diff] [review]
Proposed patch
Could whomever gets here first give r+sr ;-)
Attachment #159834 -
Flags: superreview?(jst)
Attachment #159834 -
Flags: review?(bryner)
Comment 5•21 years ago
|
||
Comment on attachment 159834 [details] [diff] [review]
Proposed patch
r+sr=jst
Attachment #159834 -
Flags: superreview?(jst)
Attachment #159834 -
Flags: superreview+
Attachment #159834 -
Flags: review?(bryner)
Attachment #159834 -
Flags: review+
Attachment #159834 -
Flags: approval1.8a4?
Comment 6•21 years ago
|
||
Want this for branches, jst and I think. Nice safe fix.
/be
Flags: blocking1.7.x+
Flags: blocking-aviary1.0+
Comment 7•21 years ago
|
||
Comment on attachment 159834 [details] [diff] [review]
Proposed patch
a=brendan@mozilla.org for the branches -- who will check this in?
/be
Attachment #159834 -
Flags: approval1.8a4?
Attachment #159834 -
Flags: approval1.8a4-
Attachment #159834 -
Flags: approval1.7.x+
Attachment #159834 -
Flags: approval-aviary+
Comment 8•21 years ago
|
||
Fix landed on aviary and 1.7 branches.
Keywords: fixed-aviary1.0,
fixed1.7.x
![]() |
||
Updated•21 years ago
|
Whiteboard: [needed on trunk]
Comment 9•21 years ago
|
||
Comment on attachment 159834 [details] [diff] [review]
Proposed patch
'brendan: approval1.8a4-':
What about v1.8a5 Trunk then ?
Assignee | ||
Comment 10•21 years ago
|
||
Fix checked in, thanks for reminding me.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: [needed on trunk]
Updated•21 years ago
|
Target Milestone: --- → mozilla1.8alpha5
You need to log in
before you can comment on or make changes to this bug.
Description
•