Closed
Bug 445407
Opened 16 years ago
Closed 16 years ago
text edit fields do not work right
Categories
(Toolkit Graveyard :: Spatial Navigation, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dougt, Assigned: dougt)
References
Details
Attachments
(2 files)
4.25 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
22.66 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
when using spatial navigation, when entering into a textarea or input text, focus is lost -- and snav can't really do much. We should detect that we are in a text field and let the default action happen if it makes sense.
Assignee | ||
Comment 1•16 years ago
|
||
clean patch. I have another patch which includes these changes but also includes a bunch of whitespace changes to match style throughout the file. hg diff -w was not working very well.
Attachment #329746 -
Flags: review?
Assignee | ||
Comment 2•16 years ago
|
||
this is what is actually going to be checked in. two new mochitests. the first test is to ensure that we do the right thing when encountering a disabled element. the second test navigates over a text input field and a text area. all tests, no leaks. better usability.
Attachment #329749 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Attachment #329749 -
Flags: review? → review?(gavin.sharp)
Comment 3•16 years ago
|
||
Comment on attachment 329746 [details] [diff] [review] patch v.1 w/o whitespace changes >--- /Users/dougt/Desktop/SpatialNavigation.js 2008-07-15 16:00:12.000000000 -0700 >+++ toolkit/spatial-navigation/SpatialNavigation.js 2008-07-15 15:56:51.000000000 -0700 >+ // check to see if we are in a texttarea or text input element, and if so, "textarea" >+ // ensure that we let the arrow keys work properly. >+ >+ if((event.target instanceof Ci.nsIDOMHTMLInputElement && event.target.type.toLowerCase() == "text") || >+ event.target instanceof Ci.nsIDOMHTMLTextAreaElement ) { nit: space before "(". no need for the toLowerCase, nsHTMLInputElement::GetType always returns a lowercase string. Do we want "password" inputs too? >+ if (event.keyCode == event.DOM_VK_RIGHT || event.keyCode != event.DOM_VK_DOWN ) > window.document.commandDispatcher.advanceFocus(); >+ else >+ window.document.commandDispatcher.rewindFocus(); Huh, so there is a rewindFocus!
Attachment #329746 -
Flags: review? → review+
Assignee | ||
Comment 4•16 years ago
|
||
yeah, rewind! http://mxr.mozilla.org/mozilla-central/source/dom/public/idl/xul/nsIDOMXULCommandDispatcher.idl#65 thanks. :-)
Comment 5•16 years ago
|
||
Comment on attachment 329749 [details] [diff] [review] patch v.1 w/ whitespace changes and new mochi tests >diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in >+ifdef NS_OSSO >+EXTRA_DSO_LDOPTS += -llocation -lgpsbt >+endif I'm assuming this wasn't meant to be part of this patch.
Attachment #329749 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 6•16 years ago
|
||
oh sorry, it is cruft that landed last night. I need to start either using mq or multiple trees.
Assignee | ||
Comment 8•16 years ago
|
||
fd1c0f6abf6d
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Blocks: 1243213
Updated•6 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•