#6519 closed defect (fixed)
Textarea: Focus problem in FF2
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit - Form | Version: | 1.1.0 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
Hi, first of all thanks for implementing the onfocus and onblur for textareas!
Unfortunately, with Firefox 2, the focus event does not work quite ok:
- When navigating with Tabs, only on the second tab press the onfocus event is executed
- When using the mouse, the onfocus event only works when the box of the textarea is clicked, not the interior.
This might be related to the issue where navigating away from a textarea in FF needs tab to be pressed twice.
if you have any questions: my email is ben-at-benzahler.ch
thanks
Attachments (1)
Change History (13)
comment:1 Changed 14 years ago by
Component: | General → Dijit |
---|---|
Milestone: | → 1.3 |
Owner: | changed from anonymous to Douglas Hays |
comment:2 Changed 14 years ago by
Milestone: | 1.3 → 1.2 |
---|---|
Status: | new → assigned |
comment:3 Changed 14 years ago by
Summary: | Textarea: Focus in FF → [patch][ccla]Textarea: Focus in FF |
---|
comment:4 Changed 14 years ago by
The registerWin() call makes sense, but the changes to focus.js don't seem right... dijit._onFocusNode(node)
needs to be called with the node that got focused; with your patch isn't it always called with <body> ?
Also, the reason that _onFocusNode(node) returns instantly when node==<body> is (for example) when a user presses the arrow keys on a Spinner... IIRC on some browser it would defocus the input and focus the body, but we want to continue to say that the Spinner is focused.
In general a focus event on <body> is more like a blur than a focus, although I understand that TextArea with the iframe is a special case.
comment:5 Changed 14 years ago by
Changed 14 years ago by
Attachment: | 6519.2.patch added |
---|
Munged focus manager to connect focus/blur to the document instead of body for non-IE. Changed _onFocusNode to ignore body focus events immediately after a blur instead of all the time
comment:6 Changed 14 years ago by
Milestone: | 1.2 → tbd |
---|---|
Owner: | changed from Douglas Hays to bill |
Status: | assigned → new |
Summary: | [patch][ccla]Textarea: Focus in FF → Textarea: Focus problem in FF2 |
Reassigning as a focus manager problem. The current focus manager listens for focus and blur events on the body tag of an iframe, but in FF2, you apparently have to listen on the document instead, at least for iframes.
comment:7 Changed 14 years ago by
Milestone: | tbd → 1.2 |
---|
I think [14687] fixed the mouse problem. In http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_Textarea.html the mouse is working correctly for me. Try clicking in/out of the Textarea with the red border and you get "user focus handler" / "user blur handler" messages.
As for keyboard, I am seeing an issue that tabbing into a Textarea doesn't cause the focus handler to be called, and as Doug said monitoring focus/blur on the document rather than <body> seems to fix it, so I'll work on that.
Note that on IE with widgets like Spinner, clicking the up/down arrows sets focus to <body>; we have special code to ignore those type events, since clicking the up/down arrows shouldn't cause a notification that focus has left the spinner. Need to be careful not to break that.
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 Changed 14 years ago by
Ref'd in [15692]: Fix for DateTextBox? inside of iframe. Fixes #7979.
Actually this is cleanup from [15197] (refs #6519); forgot to change a reference from <body> to the document." /workspace/1.2/dijit/_base/focus.js /workspace/trunk/dijit/_base/focus.js
comment:10 Changed 13 years ago by
Looks like this change broke tabbing into an editor on FF3/mac (and maybe other places too), in that the focus manager thinks nothing has focus. It works correctly on IE7.
comment:11 Changed 13 years ago by
(In [16554]) [15197] and [15692] had problems. They didn't differentiate between clicks/focus on an Editor's iframe's document, and on the "main" document where dojo is loaded, if the main document itself was an iframe.
Adding explicit code to register that click/focus on the the Editor's iframe's document are to be reported as click/focus on the Editor's <iframe> node.
BTW this fix also masks differences between browsers as to where the focus event is reported:
- FF: the event was reported on the document, but mysteriously the Editor's iframe's document and the main window's document are the same,or at least they appear to be the same in a console.log().
- IE: the <iframe> node
- Safari: the iframe's <body> node
comment:12 Changed 11 years ago by
Component: | Dijit → Dijit - Form |
---|
I feel like we fixed this before but I can't find the ticket; perhaps I'm getting confused with Editor. Or maybe we decided is wasn't feasible to fix this on FF2? I can't remember. (Does problem still happen on FF3?)