Closed
Bug 36800
Opened 25 years ago
Closed 25 years ago
select event is not firing
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: bora123, Assigned: joki)
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m15)
BuildID: M15
I am trying to eliminate the text selection from portions of the layout.
So far i had no luck. I am trying to capture select event so that can call
Event.preventDefault() from an event handler function. It is not event catching
select events.
Reproducible: Always
Steps to Reproduce:
1.put a select event handler to any html object
2.call an event handler
3.prevent text selection
Actual Results: No success, select event can not be caught.
Expected Results: catching the event and disabling the text selection using
Event.preventDefault().
<html>
<script>
function ch() {
alert("hello");
Event.cancelable=True;
Event.preventDefault();
}
</script>
<body bgcolor="#c0c0c0">
<div id=b_1 width=100 height=26 select="ch()">
Hey there
</div>
</body>
</html>
Marking this bug INVALID for the following reasons:
* The attribute should be "onselect", not "select".
* The HTML4 spec defines onselect as: "The onselect event occurs when a user
selects some text in a text field. This attribute may be used with the INPUT and
TEXTAREA elements."
* The testcase doesn't work in 4.x, so there's no compatibility issue either.
Other irrelevant problems with the testcase are:
* You should test for event.cancelable and event.preventDefault before using
them (in Mozilla's case, the former will cause a problem)
* DIV doesn't have HEIGHT and WIDTH attributes.
* There's no way for the event to get to the function ch. You'd need
ch(event).
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Comment 2•25 years ago
|
||
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Comment 4•25 years ago
|
||
Source code problem not ours. Marking as verified.
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•