[FIX]Links, events, scripts shouldn't fire when user select an object

RESOLVED FIXED in mozilla1.2alpha

Status

P1
enhancement
RESOLVED FIXED
17 years ago
11 years ago

People

(Reporter: admin, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.2alpha

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
BuildID:    2001122108

I think it is okay to fire links, events, scripts etc. in the browser window,
but when user wants to select the element, these kind of stuffs shouldn't fire,
for example, when user wants to select a link element that will open a new
window, the new window shouldn't be opened.


Reproducible: Always
Steps to Reproduce:
1. open test case
2. try to select on those link elements



Actual Results:  all events, links, scripts etc. are fired, just like normal.


Expected Results:  these kind of stuffs shouldn't fire as user wants to select
elements only.
(Reporter)

Comment 1

17 years ago
Created attachment 62704 [details]
testcase

testcase for dom inspector.
(Assignee)

Updated

17 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

17 years ago
ok, here's a much smaller testcase, the reporter is right, and actually editor 
has a similar problem.
Steps to play: click the url link, inspect the window, click the link to select 
it for inspection.
Expectation: Inspector displays information about the link.
Likely result: Window goes away.
Severity: normal → enhancement
OS: Linux → All
Hardware: PC → All
(Reporter)

Comment 3

17 years ago
oh well ... the window goes away ... i haven't think of this, may be this is not
just an enhancement than ?

Updated

17 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → Future
(Assignee)

Comment 4

16 years ago
Created attachment 93954 [details] [diff] [review]
call preventDefault() and stopPropagation() a lot.

Comment 5

16 years ago
Comment on attachment 93954 [details] [diff] [review]
call preventDefault() and stopPropagation() a lot.

r=jkeiser if you prevent mousedown in MouseDownListener too--not that I'm a DOM
Inspector hacker, but I am an events hacker :)	Also note that there is dead
code in MouseDownListener (the "mouseover" case), may want to remove that if
hewitt wants.

This doesn't prevent onmouseover and onmousemove, but unless we are really
trying to prevent all JS from happening (which I don't think we are), this
should deal with the common cases (most of which happen on click, the worst of
which is <A HREF>).
Attachment #93954 - Flags: review+
(Assignee)

Comment 6

16 years ago
taking
Assignee: hewitt → bzbarsky
Status: ASSIGNED → NEW
Priority: -- → P1
Summary: Links, events, scripts shouldn't fire when user select an object → [FIX]Links, events, scripts shouldn't fire when user select an object
Target Milestone: Future → mozilla1.2alpha
(Assignee)

Comment 7

16 years ago
Created attachment 93961 [details] [diff] [review]
patch with jkeiser's comment addressed
Attachment #93954 - Attachment is obsolete: true
(Assignee)

Comment 8

16 years ago
Comment on attachment 93961 [details] [diff] [review]
patch with jkeiser's comment addressed

marking r=jkeiser
Attachment #93961 - Flags: review+

Comment 9

16 years ago
Comment on attachment 93961 [details] [diff] [review]
patch with jkeiser's comment addressed

sr=hewitt
Attachment #93961 - Flags: superreview+
(Assignee)

Comment 10

16 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.