Bug 167921 - allow web pages to use preventDefault so that typeaheadfind doesn't interfere with them. r=kyle, sr=brendan. Also fixes bug 165315 - typeaheadfind shouldn't hardcode kbd shortcuts, bug 77704 - add accelerator for find prev (also added menu item). Also fixes bug 167783 - ctrl+g for typeaheadfind after repeating characters. Also fixes bug 168408 - backspace after bad character typed should do the right thing, but don't add bad characters to buffer. Also fixes bug 71832 - add F3 for find next (also shift+F3). Bug 157669 - Alt+D to select location bar (IE keyboard compatibility), r=sgehani, sr=hewitt

This commit is contained in:
aaronl%netscape.com 2006-09-14 06:06:31 +00:00
Родитель 64f6b0827b
Коммит 132176e970
6 изменённых файлов: 22 добавлений и 12 удалений

Просмотреть файл

@ -382,13 +382,13 @@ function BrowserFind()
findInPage(getBrowser(), window._content, focusedWindow)
}
function BrowserFindAgain()
function BrowserFindAgain(reverse)
{
var focusedWindow = document.commandDispatcher.focusedWindow;
if (!focusedWindow || focusedWindow == window)
focusedWindow = window._content;
findAgainInPage(getBrowser(), window._content, focusedWindow)
findAgainInPage(getBrowser(), window._content, focusedWindow, reverse)
}
function BrowserCanFindAgain()

Просмотреть файл

@ -161,7 +161,7 @@ Contributor(s):
<textbox id="urlbar" class="chromeclass-location" flex="1"
type="autocomplete" searchSessions="history"
timeout="50" maxrows="6" alwaysopenpopup="true"
disablehistory="false"
disablehistory="false" accesskey="d"
defaultSearchEngine="true" tabScrolling="true"
showCommentColumn="true"
inputtooltiptext="&locationBar.tooltip;"

Просмотреть файл

@ -80,8 +80,11 @@
<key id="key_viewPrevSidebarPanel" keycode="VK_PAGE_UP" oncommand="SidebarGetRelativePanel(-1);" modifiers="alt" />
<!-- Search Menu -->
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<key id="key_findPrev" key="&findPrevCmd.commandkey;" command="Browser:FindPrev" modifiers="accel,shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="Browser:FindAgain"/>
<key keycode="&findPrevCmd.commandkey2;" command="Browser:FindPrev" modifiers="shift"/>
<!-- Go Menu -->
@ -143,7 +146,8 @@
<!-- Search Menu -->
<command id="Browser:Find" oncommand="BrowserFind();" observes="isImage"/>
<command id="Browser:FindAgain" oncommand="BrowserFindAgain();" observes="isImage"/>
<command id="Browser:FindAgain" oncommand="BrowserFindAgain(false);" observes="isImage"/>
<command id="Browser:FindPrev" oncommand="BrowserFindAgain(true);" observes="isImage"/>
<!-- Bookmarks Menu -->
<command id="Browser:AddBookmark" label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
@ -226,6 +230,7 @@
<menuseparator/>
<menuitem id="menu_find" label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
<menuitem id="menu_findAgain" label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
<menuitem id="menu_findPrev" label="&findPrevCmd.label;" accesskey="&findPrevCmd.accesskey;" key="key_findPrev" command="Browser:FindPrev"/>
<menuseparator id="menu_PrefsSeparator"/>
<menuitem id="menu_preferences" oncommand="goPreferences('navigator', 'chrome://communicator/content/pref/pref-navigator.xul', 'navigator')"/>
</menupopup>
@ -362,7 +367,7 @@
<menu accesskey="&helpMenuCmd.accesskey;" id="menu_Help"/>
<!-- Menu for testing. -->
<menu id="debugMenu" accesskey="D" label="Debug">
<menu id="debugMenu" accesskey="U" label="Debug">
<menupopup>
<menu label="Verification">
<menupopup>

Просмотреть файл

@ -98,6 +98,9 @@
<key id="key_selectAll"/>
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<key id="key_findNext" key="&findPrevCmd.commandkey;" command="Browser:FindPrev" modifiers="accel, shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="Browser:FindAgain"/>
<key keycode="&findPrevCmd.commandkey2;" command="Browser:FindPrev" modifiers="shift"/>
<keyset id="viewZoomKeys"/>
</keyset>
@ -157,6 +160,8 @@
label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;"/>
<menuitem id="menu_findAgain" key="key_findAgain" command="Browser:FindAgain"
label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;"/>
<menuitem id="menu_findPrev" key="key_findPrev" command="Browser:FindPrev"
label="&findPrevCmd.label;" accesskey="&findPrevCmd.accesskey;"/>
</menupopup>
</menu>

Просмотреть файл

@ -9,11 +9,6 @@
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
<!-- Supporting IE forward and back accelerators out of courtesy
to transitioning IE users -->
<key keycode="VK_BACK" command="Browser:Back"/>
<key keycode="VK_BACK" command="Browser:Forward" modifiers="shift"/>
<!-- Supporting IE 'refresh' shortcut key -->
<key keycode="VK_F5" oncommand="BrowserReload();"/>
<key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>

Просмотреть файл

@ -116,6 +116,11 @@
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findAgainCmd.commandkey "g">
<!ENTITY findPrevCmd.label "Find Previous">
<!ENTITY findPrevCmd.accesskey "v">
<!ENTITY findPrevCmd.commandkey "g">
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
<!ENTITY findPrevCmd.commandkey2 "VK_F3">
<!ENTITY searchInternetCmd.label "Search the Web">
<!ENTITY searchInternetCmd.accesskey "S">