Closed Bug 215472 Opened 22 years ago Closed 20 years ago

listbox onClick: click event should not be generated upon clicking on the scrollbar handle

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 215928

People

(Reporter: arsukdeo, Unassigned)

Details

(Keywords: regression)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030807 It does not make sense to generate a click event when a user is clicking the scroll-handles of the listbox in an attempt to scroll the listbox, before making a selection. The click event should only be generated when the user clicks on a displayed list of items. No click events should be generated for for an empty listbox, should the user click in the list view area. Reproducible: Always Steps to Reproduce: 1.Create an HTML page with a listbox having sufficient elements for scrolling. 2.<SELECT NAME=m_select onClick="Javascript:alert ('click')"><OPTION>A</OPTION>.....</SELECT> 3. Actual Results: You should be able to see the 'click' message when the scrollbar is clicked. This is a problem. Expected Results: Mozilla should ignore/filter the clicks. [This following is related to this behaviour problem] Remove the elements from listbox and click on the viewable area. Mozilla should ignore/filter the clicks. Also, while working on the listbox, make sure that setting the selectIndex to a value within the set {0,1,...,N}, where there are N+1 items, will cause the listbox to scroll the selected item into the viewable area.
Sorry, please set the size of the listbox. For example: <SELECT NAME=m_select size=4 onClick="Javascript:alert('click')"> <OPTION>A</OPTION> <OPTION>B</OPTION> <OPTION>C</OPTION> <OPTION>D</OPTION> <OPTION>E</OPTION> <OPTION>F</OPTION> <OPTION>G</OPTION> </SELECT>
Not a JavaScript Engine issue. JavaScript Engine is for core issues that involve JavaScript as a language, not browser issues. For example, issues involving String(), Number(), Date(), and RegExp(). The JavaScript language itself has no notion of events - that is a feature of the browser. Reassigning to Event Handling component -
Assignee: rogerl → saari
Component: JavaScript Engine → Event Handling
QA Contact: pschwartau → ian
Confirming on WinXP Moz 2003080304, although I'm not sure that this is how it's supposed to work. It works in IE6 though. >>Remove the elements from listbox and click on the viewable area. Mozilla should ignore/filter the clicks. I'm pretty sure it's acting as it's supposed to. W3C Spec (http://www.w3.org/TR/html4/interact/scripts.html#events) says "The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements." Doesn't mention anything about where you click on it. Works the same in IE. >>Also, while working on the listbox, make sure that setting the selectIndex to a value within the set {0,1,...,N}, where there are N+1 items, will cause the listbox to scroll the selected item into the viewable area. That's a seperate issue. File another bug. Severity->Minor. There's an easy work-around.
Severity: major → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Excellent. My interest is in maintaining the behaviour set by Mozilla 1.3, Netscape pre 7.1 and IE, by eliminating any unnecessary click events when the SIZE attribute is used in the SELECT element. Otherwise, an undesirable side- effect will be created in existing web site implementations of listboxes.
Keywords: regression
Encountering this bug (?) on this page, clicking on the navigation arrows or scrollbar 'selects' the currently highlighted entry: http://www.wta.org/~wta/cgi-bin/wtaweb.pl?7+fr+time
http://www.wta.org/~wta/cgi-bin/wtaweb.pl?7+fr+time Thanks for the submission. This link is actually a good test case to confirm this bug in post mozilla 1.3 versions. Since, the updated listbox-code results in a break from established behaviour, and this is a serious devolution in behaviour and potential limitation of application of the listbox to website implementations, I would hope that this bug be reclassified as serious and get fixed in the next released version of Mozilla. Otherwise, recommendation for support of Mozilla would be pretty limited by the webmaster population out there.
Assignee: saari → jbird3000
Yeah, I can't fix this. I can't fix anything. Reassigning.
Assignee: jbird3000 → nobody
*** This bug has been marked as a duplicate of 215928 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.