Bug 405696 - Cmd+F in download manager doesn't work on Mac. Bug 405698 - Cmd+F should select search field contents. r=mconnor.

This commit is contained in:
mozilla.mano@sent.com 2007-12-02 12:12:43 -08:00
Родитель 5f776bd6b7
Коммит dcf9e3efc8
3 изменённых файлов: 23 добавлений и 5 удалений

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

@ -45,6 +45,15 @@
#include browserMountPoints.inc
<script type="application/javascript"><![CDATA[
// Bug 405696: Map Edit->Find command to the download manger's command
window.addEventListener("load", function(event) {
var findMenuItem = document.getElementById("menu_find");
findMenuItem.setAttribute("command", "cmd_findDownload");
findMenuItem.setAttribute("key", "key_findDownload");
}, false);
]]></script>
</window>
</overlay>

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

@ -717,7 +717,9 @@ var gDownloadViewController = {
function setSearchboxFocus()
{
document.getElementById("searchbox").focus();
var searchbox = document.getElementById("searchbox");
searchbox.focus();
searchbox.select();
}
function onDownloadShowInfo()

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

@ -103,7 +103,12 @@
<command id="cmd_clearList"
oncommand="gDownloadViewController.doCommand('cmd_clearList');"/>
</commandset>
<!-- Use this commandset for command which do not depened on focus or selection -->
<commandset id="generalCommands">
<command id="cmd_findDownload" oncommand="setSearchboxFocus();"/>
</commandset>
<keyset id="downloadKeys">
<key id="key_pauseResume" key=" " command="cmd_pauseResume"/>
<key id="key_removeFromList" keycode="VK_DELETE" command="cmd_removeFromList"/>
@ -117,9 +122,11 @@
<key id="key_close2" key="&cmd.close2.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
#endif
<key keycode="VK_ESCAPE" oncommand="closeWindow(true);"/>
<key id="key_find"
key="&cmd.find.commandKey;" modifiers="accel"
oncommand="setSearchboxFocus()"/>
<key id="key_findDownload"
key="&cmd.find.commandKey;"
modifiers="accel"
command="cmd_findDownload"/>
<key id="key_info" key="&cmd.info.commandKey;" oncommand="onDownloadShowInfo();" modifiers="accel"/>
</keyset>