Closed
Bug 190399
Opened 22 years ago
Closed 6 years ago
Add oninput, onfocus, onblur event handlers to menulist widget
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: WeirdAl, Assigned: WeirdAl)
References
()
Details
Attachments
(3 files, 2 obsolete files)
The <xul:menulist/> element does not currently support adding onfocus or onblur event handlers. Editable menulists do not support the oninput event handler. They do support event listeners; the current implementation for editable menulists uses an event listener to pass focus and blur onto the anonymous <html:input/> node. I have gotten the oninput event handler working for editable menulists; I am filing this bug to track the issue, and should have a patch tomorrow.
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
I'd appreciate anyone who could independently test this patch. I've had a couple strange effects. This patch repeatedly causes a window focus problem on the last testcase (probably related to one of the bugs bug 140346 blocks). Also, the testcase, with patch engaged, apparently doesn't always want to let you focus on the editable menulist without focusing on something else first. No idea why. I'm also wondering about the correct order of focus and blur events which this bug should implement. Should menulist take focus before or after the input field, or vice versa? Likewise, which element should lose focus first?
Assignee | ||
Comment 3•22 years ago
|
||
cc'ing jst and jkeiser for events clarification.
Assignee | ||
Comment 4•22 years ago
|
||
jkeiser dislikes (with good reason) firing two focus events, and thinks there's a more fundamental process going on to look into. So I'm splitting off the oninput patch, which is unrelated, and promoting that one while obsoleting the onfocus and onblur patch suggestion.
Attachment #112527 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #112550 -
Flags: superreview?(jaggernaut)
Attachment #112550 -
Flags: review?(neil)
Comment 5•22 years ago
|
||
Perhaps xbl:inherits="onfocus,onblur,..." will work à la textbox. Also, I don't know what the input problem is, can you provide a test case?
Comment 6•22 years ago
|
||
Doh, why don't I read the bug before commenting :-) Is there a reason why the attributes should be kept up-to-date? Interestingly the "label" setter changes the property but not the attribtues...
Comment 7•22 years ago
|
||
Comment on attachment 112526 [details]
Testcase (XUL document)
Please remember to include the global stylesheet next time...
Comment 8•22 years ago
|
||
Comment on attachment 112550 [details] [diff] [review] patch, v2 (for oninput only) This is wrong anyway because you only set the "value" attribute, everywhere else also sets "label".
Attachment #112550 -
Flags: review?(neil) → review-
Comment 9•22 years ago
|
||
Current behaviour: 1. Selecting a menuitem updates both attributes 2. Setting .value updates both attributes 3. Setting .label updates neither attribute 4. oninput updates neither attribute I'm still not convinced that 1 & 2 are correct and 3 & 4 are wrong :-/
Comment 10•22 years ago
|
||
Attachment #112870 -
Attachment is obsolete: true
Assignee | ||
Comment 11•21 years ago
|
||
Comment on attachment 112550 [details] [diff] [review] patch, v2 (for oninput only) Clearing sr? flag on patch which has r-.
Attachment #112550 -
Flags: superreview?(jag)
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: shrir → xptoolkit.widgets
Assignee | ||
Comment 12•6 years ago
|
||
This bug was filed sixteen years ago - if it hasn't happened by now, with XUL on the way out, it's never going to happen.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•