Closed
Bug 92779
Opened 24 years ago
Closed 20 years ago
ondblclick() can't be called from js until it has been triggered by an actual double click.
Categories
(Core :: DOM: Events, defect, P4)
Core
DOM: Events
Tracking
()
RESOLVED
WORKSFORME
mozilla1.1alpha
People
(Reporter: galfandary, Assigned: joki)
References
()
Details
Attachments
(2 files)
797 bytes,
text/html
|
Details | |
reporter's html with linefeed inside the quotes of ondblclick="dbg('Text 2 double-clicked')" removed
793 bytes,
text/html
|
Details |
<html>
<head>
<title>Double Click Bug</title>
<script>
function dbg(s) { document.form1.events.value+=s+'\n'; }
</script>
</head>
<body>
<h1 id=text1 onclick="dbg('Text 1 clicked')" ondblclick="dbg('Text 1 double-
clicked')">Text 1</h1>
<h1 id=text2 onclick="dbg('Text 2 clicked')" ondblclick="dbg('Text 2 double-
clicked')">Text 2</h1>
<form name=form1>
<input type=text name=click1 value=text1>
<input type=button value="Click By ID"
onclick="document.getElementById(document.form1.click1.value).onclick()">
<br>
<input type=text name=click2 value=text1>
<input type=button value="Double-Click By ID"
onclick="document.getElementById(document.form1.click2.value).ondblclick()">
Events:<br>
<textarea name=events rows=20 cols=30>
</textarea>
</form>
</body>
</html>
If you click the "Double-Click By ID" button in the page above
nothing happens. If you double-click the text itself then the
corresponding ondblclick() function call begins to work.
Updated•24 years ago
|
Assignee: rogerl → joki
Severity: critical → normal
Component: Javascript Engine → Event Handling
QA Contact: pschwartau → madhur
Comment 1•24 years ago
|
||
Lowering severity to normal and moving over to Event Handling
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
the second attachment works for me. w98 2001072808 trunk
Comment 5•24 years ago
|
||
See also bug 47078, Newlines are not converted to whitespace in attributes.
By the way, the testcase doesn't work in IE either. Does it work in any
browsers?
-> Parser
Assignee: joki → harishd
Component: Event Handling → Parser
QA Contact: madhur → bsharma
Summary: ondblclick() is inaccessible. → newline in ondblclick attribute is sent to JS engine
Reporter | ||
Comment 6•24 years ago
|
||
Please ignore the newline it was entered by the textarea in the bug form.
Use the URL above.
Severity: normal → critical
Component: Parser → Javascript Engine
Summary: newline in ondblclick attribute is sent to JS engine → ondblclick() is inaccessible.
Reporter | ||
Comment 7•24 years ago
|
||
BTW, it DOES work with IE5.
Reporter | ||
Comment 8•24 years ago
|
||
I don't believe this bug is platform specific but, just in case,
it was reproducible on the SUN nightly 20010730.
Reporter | ||
Comment 9•24 years ago
|
||
Also reproducible on:
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010704
Updated•24 years ago
|
Assignee: harishd → joki
Severity: critical → normal
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Events
Ever confirmed: true
QA Contact: bsharma → vladimire
Summary: ondblclick() is inaccessible. → ondblclick() can't be called from js until it has been triggered by an actual double click.
Comment 10•24 years ago
|
||
Ok, I see what you're saying now. Sorry for misunderstanding the bug report.
Sounds like this is a DOM issue rather than a JavaScript language issue, so ->
DOM Events and confirming.
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla1.1
Reporter | ||
Updated•23 years ago
|
Updated•23 years ago
|
Priority: -- → P4
Comment 11•21 years ago
|
||
The original bug reported here seems to be gone: the (second) testcase works for
me using Firefox 1.0 on the Mac. (The "double click by ID" button works fine
from the start.)
However, it looks like the bug that was inadvertently revealed because of the
extra linefeed in the first testcase is still present: the newlines in the
ondblclick attributes are being sent to the Javascript processor (on an actual
double-click, the console gives an "unterminated string literal" error, while
the "by ID" button gives an "uncaught exception"). This seems to be related to
a number of other bugs caused by line breaks in the HTML not being properly
replaced with spaces (bug 67127, for example; also see bug 47078).
At any rate, it seems clear that this bug report should be changed somehow:
either the status should be "worksforme" (and a second bug report filed for the
newline problem, if that's not already duplicated somewhere), or the bug should
be morphed to cover the new topic (probably with a change of components). I
don't have the authority (or the knowledge, really) to do either, but it would
be good if someone eventually did.
Comment 12•20 years ago
|
||
For the record, I have just filed bug 322270 to address the issue of line breaks in javascript attributes that was revealed by the first attachment here. This bug should probably be resolved as WORKSFORME at this point, since the originally stated bug no longer seems to be present (but I haven't tested carefully on multiple platforms, so I'd appreciate comments before making that change). The secondary issue should hopefully be covered by the new bug.
Comment 13•20 years ago
|
||
WFM Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060102 Firefox/1.6a1
with the second testcase.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•