Closed
Bug 176296
Opened 22 years ago
Closed 22 years ago
[RFE][Type Ahead] Type Ahead Find preferences need ability to force start with / or ' only
Categories
(SeaMonkey :: Find In Page, enhancement)
SeaMonkey
Find In Page
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: owen.marshall+bmo, Assigned: aaronlev)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
aaronlev
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Seems that everyone is griping about this in bug #30088. There should be a pref
that allows me to pick between pressing a key to start it, or just typing to
start it.
To go a bit farther, this should, IMHO, default to using keys only.
see bug 169489 and bug 169489 comment 9 (text repeated for bugzilla's linking).
suggesting marking this as a dup of aforementioned bug.
i strongly feel that the default isearch method should require initiation.
prefs (copied from my post, bug 169489 comment 9):
(*) require manual initiation of isearches
( ) always in isearch links mode
__ begin isearch of links __ begin reversed isearch of links
( ) always in isearch text mode
__ begin isearch of all text __ begin reversed isearch of text
"( )" is a radio button, "__" is a single-character input box
defaults: require manual, ' links, " reverse links, / text, ? reverse text.
Reporter | ||
Comment 2•22 years ago
|
||
I disagree entirely here. The other bug was created to show other preferences
in the UI. This bug is to create the preference so there can be a UI link.
There is, IMHO, no dupe.
I have to agree with you with the defaults, though -- the default should
be "require a keypress to start". But there should be no UI elements. Only
people who need it are going to turn it to autostart, and these people will
know where and how to change it.
Reporter | ||
Comment 3•22 years ago
|
||
To expand on this, if I felt a UI link should be created, bug 169489 should
depend on this bug. But, since I don't...
Assignee | ||
Comment 4•22 years ago
|
||
*** Bug 175807 has been marked as a duplicate of this bug. ***
Comment 5•22 years ago
|
||
confirming.
Comment 6•22 years ago
|
||
*** Bug 172283 has been marked as a duplicate of this bug. ***
Comment 7•22 years ago
|
||
To support the idea that there has to be a way to force a slash before
the search start, please consider, that in Galeon, you can use the "vi"
keys "j" and "k" to scroll around the page. And typeahead that came
with Mozilla 1.2 and Galeon 1.2.7 breaks this. Search without extra
windows popping up is nice but it should be strictly started by a defined
keystroke, at least as an option.
Comment 8•22 years ago
|
||
I actually find myself avoiding using typeahead find, since it confuses me that
there's no key to start searching. I know this is slightly weird behavior on my
part, but there you have it.
Assignee | ||
Comment 9•22 years ago
|
||
Also fixes bug 183998 -- make / and ' start typeaheadfind in mailnews.
Assignee | ||
Comment 10•22 years ago
|
||
Comment on attachment 108790 [details] [diff] [review]
Implements new bool pref accessibility.typeaheadfind.autostart, and avoids unnecessary keypress listeners
Also seeking r=sspitzer for mailnews changes.
Attachment #108790 -
Flags: review?(kyle.yuan)
Comment 11•22 years ago
|
||
Comment on attachment 108790 [details] [diff] [review]
Implements new bool pref accessibility.typeaheadfind.autostart, and avoids unnecessary keypress listeners
Index: dom/src/base/nsGlobalWindow.cpp
===================================================================
RCS file: /cvsroot/mozilla/dom/src/base/nsGlobalWindow.cpp,v
retrieving revision 1.566
diff -u -r1.566 nsGlobalWindow.cpp
--- dom/src/base/nsGlobalWindow.cpp 4 Dec 2002 02:51:47 -0000 1.566
+++ dom/src/base/nsGlobalWindow.cpp 9 Dec 2002 22:11:15 -0000
@@ -132,7 +132,8 @@
#include "nsIJSNativeInitializer.h"
#include "nsIFullScreen.h"
#include "nsIStringBundle.h"
-#include "nsIScriptEventManager.h" // For GetInterface()
+#include "nsITypeAheadFind.h"
+#include "nsIScriptEventManager.h" // For GetInterface()
#include "nsIConsoleService.h"
here, you shouldn't introduce a new dependency of nsITypeAheadFind to
nsGlobalWindow.cpp. other part looks good to me.
Attachment #108790 -
Flags: review?(kyle.yuan) → review-
Assignee | ||
Comment 12•22 years ago
|
||
CC'ing jst for input on the dependency issue.
Johnny, my patch adds a dependency on typeaheadfind in
nsDOMWindowController::DoCommand(), so that it can start a type ahead find when
the user presses / or '
Is this okay? If not, what do you suggest?
Comment 13•22 years ago
|
||
*** Bug 184640 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 14•22 years ago
|
||
Comment on attachment 108790 [details] [diff] [review]
Implements new bool pref accessibility.typeaheadfind.autostart, and avoids unnecessary keypress listeners
Johnny, Kyle turned it down because of a dependency on nsITypeAheadFind in
DOMWindowController. However, that's what the interface to typeaheadfind is
for, control by the app. Would you rather have me use nsIObserver or something?
Attachment #108790 -
Flags: superreview?(jst)
Comment 15•22 years ago
|
||
Yeah, I'd rather see the DOM code *not* depend on typeahead find which, at least
in theory, is an optional extension.
Updated•22 years ago
|
Attachment #108790 -
Flags: superreview?(jst) → superreview-
Assignee | ||
Updated•22 years ago
|
Attachment #108790 -
Attachment is obsolete: true
Assignee | ||
Comment 16•22 years ago
|
||
A lot of work was necessary to do this right:
1. Adds / and ' to htmlBindings.xml
2. Inserts nsTypeAheadController into nsIControllers for each dom window opened
3. Implements pref for autostart in browser window.
4. Implements autostart="false" attribute for mailnews, to require manual
typeahead start there
5. Only attach keypress and other listeners if typeahead is in autostart mode,
or manually started.
6. Can dynamically attach or remove keypress and other listeners if autostart
pref changes on the fly
7. When manual find is started with / or ', makes sure it starts in content
window. Focuses one first if necessary.
8. Makes sure there is no key conflict with mailnews -- changes collapse all
threads from / to \
9. Implement new pref accessibility.typeaheadfind.autostart, eAutoStartNone =
0, eAutoStartText = 1, eAutoStartLinks = 2
10. Support old pref accessibility.typeaheadfind.linksonly by converting to
autostart pref
Assignee | ||
Comment 17•22 years ago
|
||
Comment on attachment 109886 [details] [diff] [review]
Creates pref accessibility.typeaheadfind.autostart (0=force manual, 1=auto text, 2= auto links)
Seeking sr= from sspitzer because of the mailnews changes.
Please see comments in bug about why this patch is large.
Attachment #109886 -
Attachment description: Creates pref accessibility.typeahead → Creates pref accessibility.typeaheadfind.autostart (0=force manual, 1=auto text, 2= auto links)
Attachment #109886 -
Flags: superreview?(sspitzer)
Attachment #109886 -
Flags: review?(kyle.yuan)
Comment 18•22 years ago
|
||
Comment on attachment 109886 [details] [diff] [review]
Creates pref accessibility.typeaheadfind.autostart (0=force manual, 1=auto text, 2= auto links)
r=kyle with a few comments. no new patch needed.
>+NS_IMETHODIMP
>+nsTypeAheadController::IsCommandEnabled(const char *aCommand, PRBool *aResult)
>+{
>+ NS_ENSURE_ARG_POINTER(aResult);
since you are using NS_ENSURE_ARG_POINTER here, please add it to other places,
such as EnsureContentWindow(), GetStartWindow() etc.
>+
>+ *aResult = PR_FALSE;
>+
>+ if (!nsCRT::strcmp(sLinkFindString, aCommand) ||
>+ !nsCRT::strcmp(sTextFindString, aCommand)) {
personally, I think |nsCRT::strcmp() == 0| is more readable than
|!nsCRT::strcmp()|. but anyway, you can keep your own way.
>+
>+ *aStartContentWin = startContentWin;
>+ NS_ADDREF(*aStartContentWin);
shouldn't you use NS_IF_ADDREF here? because you didn't check startContentWin
in every cases.
>+ return NS_OK;
>+}
>\ No newline at end of file
need a CR here.
Attachment #109886 -
Flags: review?(kyle.yuan) → review+
Assignee | ||
Comment 19•22 years ago
|
||
Thanks Kyle, I've made the changes you suggest.
Assignee | ||
Comment 20•22 years ago
|
||
Attachment #109886 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #109886 -
Flags: superreview?(sspitzer)
Assignee | ||
Comment 21•22 years ago
|
||
Comment on attachment 110825 [details] [diff] [review]
Contains Kyle's changes, and adds autofind="false" to mail3PaneWindowVertLayout.xul
Carrying r=kyle
Attachment #110825 -
Flags: superreview?(sspitzer)
Attachment #110825 -
Flags: review+
Comment 23•22 years ago
|
||
Comment on attachment 110825 [details] [diff] [review]
Contains Kyle's changes, and adds autofind="false" to mail3PaneWindowVertLayout.xul
r=sspitzer on the mailnews parts of the patch
Attachment #110825 -
Flags: superreview?(sspitzer)
Assignee | ||
Updated•22 years ago
|
Attachment #110825 -
Flags: superreview?(jst)
Comment 24•22 years ago
|
||
Comment on attachment 110825 [details] [diff] [review]
Contains Kyle's changes, and adds autofind="false" to mail3PaneWindowVertLayout.xul
- In nsTypeAheadFind::GetStartWindow():
+{
+ // Return the root ancestor content window of aWindow
+
+ *aStartWindow = aWindow;
+
+ nsCOMPtr<nsIInterfaceRequestor> ifreq(do_QueryInterface(aWindow));
+ NS_ASSERTION(ifreq, "Can't get interface requestor");
+ if (!ifreq)
+ return;
If there's ever a window that doesn't implement nsIInterfaceRequestor (which is
unlikely, but still) and such a window is passed to this function you'll have
an unbalanced reference count since you don't addref *aStartWindow in this
early return, nor in any of the other ones later on in this method either. I'd
say you should null out *aStartWindow at the beginning of this method, and set
it to aWindow only at the end if !*aStartWindow at that point, then addref...
+nsTypeAheadController::nsTypeAheadController(nsIFocusController
*aFocusController)
+: mFocusController(aFocusController)
+{
+}
Inconsistent placement of ':' before member intiialzers, other classes in this
diff place the ':' at the end of the ctor declaration.
- The body of nsTypeAheadController::IsCommandEnabled() is identical to the
body of nsTypeAheadController::SupportsCommand(), couldn't one call the other?
sr=jst if you have a look at the above...
Attachment #110825 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 25•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 26•22 years ago
|
||
This checkin seems to have caused bug 189011 (Mail composition fails.)
Reporter | ||
Comment 27•22 years ago
|
||
Aaron, was this backed out as per bug 189011? Do we need to reopen this?
Comment 28•22 years ago
|
||
yeah, it looks like aaronl's 12:14 checkin today took care of this.
Comment 29•22 years ago
|
||
er, make that his 01/14/2003 12:42 checkin.
Comment 30•22 years ago
|
||
' and / require pressing SHIFT+#, SHIFT+7 respectively on a German keyboard
layout. Do not know about other keyboard layouts. I think this would be an
argument to let the user choose between several keys to relate to typeahead,
that do not cause any problems with other functions.
I suggest - and # or + on a German keyboard for example.
Maybe one could implement a drop down menu with key settings for different
keyboard layout to keep the prefs clean.
SHIFT+7 for the / does not work in my build whereas SHIFT+# works fine. The
former does not work when choosing from the menu too.
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3b) Gecko/20030114
Comment 31•22 years ago
|
||
reopening since this was effectively backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 32•22 years ago
|
||
FIXED (Reversed partial backout).
The partial backout caused / to no longer initiate text search, so that should
be fixed too.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 33•22 years ago
|
||
vrfy'd fixed with 2003.02.10 comm trunk bits on win2k, mac 10.2.3 and linux rh8.0.
Status: RESOLVED → VERIFIED
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•