Closed Bug 1016846 Opened 10 years ago Closed 6 years ago

CTRL+H fires the Search popup in Compose window

Categories

(Thunderbird :: Message Compose Window, defect)

24 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: klint, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140522105902

Steps to reproduce:

- Open a new mail compose window
- Press CTRL+H


Actual results:

The Search window is displayed (same as with CTRL+F).

This breaks addons that rely on CTRL+H key.


Expected results:

Nothing should have happened (or the addon feature should have been triggered)
Following <key> definition in Composer window of Thunderbird on MS Win. (by DOM Inspector)
> <key xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>    id="key_find"             key="F" command="cmd_find" modifiers="accel"/>
> <key xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>    id="key_findReplace" key="H" command="cmd_find" modifiers="accel"/>
This is wasting of valuable hotkey, because Ctrl+F/Command+F. is globally assigned to cmd_find and is used for "Find" iby OS and many applications.
"h" is not used as hotkey in messenger window, so Ctrl+H(Command+H) is free in messenger window.

I guess "id=key_findReplace command=cmd_findReplace" was used in the past for findReplace function which is different from ordinal find.
Or "find" function checks ID of key via this or event.target.id and calls findReplace function if ID=key_findReplace?

By the way, following duplicated ID assignment(menuitem) or duplicated definitions(command) was found. 
What should we do?
> Composer window.
> Hotkey : DupID : cmd_printSetup : command(parent=commandset/id=commonEditorMenuItems), command(parent=commandset/id=composeCommands)
> Hotkey : DupID : cmd_print : command(parent=commandset/id=commonEditorMenuItems), command(parent=commandset/id=composeCommands)
> Messenger window.
> Hotkey : DupID : cmd_delete : command(parent=commandset/id=mailEditMenuItems), command(parent=commandset/id=mailToolbarItems)
> Hotkey : DupID : cmd_chat : command(parent=commandset/id=mailGoMenuItems), command(parent=commandset/id=mailToolbarItems)
> Hotkey : DupID : newNewMsgCmd : menuitem(parent=menupopup/id=appmenu_newMenupopup), menuitem(parent=menupopup/id=menu_NewPopup)
> Hotkey : DupID : applyFilters : menuitem(parent=menupopup/id=appmenu_FilterMenu), menuitem(parent=menupopup/id=taskPopup)
> Hotkey : DupID : applyFiltersToSelection : menuitem(parent=menupopup/id=appmenu_FilterMenu), menuitem(parent=menupopup/id=taskPopup)
> Hotkey : DupID : addNewTag : menuitem(parent=menupopup/id=mailContext-tagpopup), menuitem(parent=menupopup/id=tagMenu-tagpopup), menuitem(parent=menupopup/id=button-tagpopup)
> Hotkey : DupID : manageTags : menuitem(parent=menupopup/id=mailContext-tagpopup), menuitem(parent=menupopup/id=tagMenu-tagpopup), menuitem(parent=menupopup/id=button-tagpopup)
1. Install "Custom Buttons" Addon.
2. Create new button, paste this code to "Code", Put the new button to Toolbar by "Custmize Toolbar".
3. Click the button, copy at Error Console, paste at Text Editor.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Ctrl+F and Ctrl+H no longer do the same thing in the compose window. The former opens an inline find bar, and the latter opens a find-and-replace window.
(In reply to Jim Porter (:squib) from comment #3)
> Ctrl+F and Ctrl+H no longer do the same thing in the compose window.
> The former opens an inline find bar, and the latter opens a find-and-replace window.

But, in compose window, both Ctrl+F and Ctrl+H opens the "find-and-replace" panel. Ctrl+F at Composer wndow in Tb 24.5.0 opens "find-and-replace" window instead of "inline find bar". And, submenu under Edit is also changed to "Find and Replace".
It's simply because same command="cmd_find"  is set in <key> for Ctrl+F and Ctrl+H, isn't it?
It's merely that "oncommand via command=cmd_find" is different between messenger/messagewindow and composer window, isn't it? 
i.e. "Find" in Composer window was enhanced to "Find and Replace".

Or Ctrl+F is changed to "open inline find bar" in trunk so independent Ctrl+F is needed?
(In reply to WADA from comment #4)
> (In reply to Jim Porter (:squib) from comment #3)
> > Ctrl+F and Ctrl+H no longer do the same thing in the compose window.
> > The former opens an inline find bar, and the latter opens a find-and-replace window.
> 
> But, in compose window, both Ctrl+F and Ctrl+H opens the "find-and-replace"
> panel. ...
> 
> Or Ctrl+F is changed to "open inline find bar" in trunk so independent
> Ctrl+F is needed?

Correct. In trunk, Ctrl+F and Ctrl+H do different things.
(In reply to Jim Porter (:squib) from comment #5) 
> Correct. In trunk, Ctrl+F and Ctrl+H do different things.

Key binding in trunk.
F/G/H in messenger (H is not used)
> f+            , id=key_nextMsg , oncommand = goDoCommand('cmd_nextMsg') , menuitem = menu_nextMsg(Message)
> f+accel       , id=key_find , oncommand = goDoCommand('cmd_find') , menuitem = menu_findCmd(Find in This Message…)
> f+accel,shift , id=key_searchMail , oncommand = goDoCommand('cmd_search') , menuitem = searchMailCmd(Search Messages…)
> g+accel       , id=key_findAgain , oncommand = goDoCommand('cmd_findAgain') , menuitem = menu_findAgainCmd(Find Again)
> g+accel,shift , id=key_findPrev , oncommand = goDoCommand('cmd_findPrevious')
F/G/H in Composer
>  f+accel , id=key_find , command = cmd_find , menuitem = menu_findBar(Find…)
>  g+accel , id=key_findNext , command = cmd_findNext , menuitem = menu_findNext(Find Again)
>  g+accel,shift , id=key_findPrev , command = cmd_findPrev , menuitem = menu_findPrev(Find Previous)
>  h+accel , id=key_findReplace , command = cmd_findReplace , menuitem = menu_findReplace(Find and Replace…)

I think "Ctrl+Alt+F" or "Ctrl+Shift+F" like one is better for cmd_findReplace. i.e. "Alternative Find" or "Powerful  Find".
Is alt, option etc. is prohibited in standard or official key binding? Or two modifiers is not appropriate for cmd_findReplace?
If "Ctrl+Shift+F", confusion with "key_searchMail at messenger window" is big problem?
By the way,  I've opened bug 1017408 for "Both command & oncommand" and bug 1017408 for "Duplicated ID"(I referred in comment #1).
(In reply to klint from comment #0)
> This breaks addons that rely on CTRL+H key.
What kind of Addon was affected by Tb's Ctrl+H(Command+H) use in composer window?
This was changed in bug 530626 (TB24) and bug 530629 (TB31). It is reasoned that Ctrl+H is a common shortcut for Search and Replace (e.g. in Word and Outlook). So it would be probably sound for an addon doing a different action to bind it to different key.
(In reply to :aceman from comment #9)

If so, WONTFIX(it's design decision) or INVALID(works as designed)?
(In reply to :aceman from comment #9)
> This was changed in bug 530626 (TB24) and bug 530629 (TB31). It is reasoned
> that Ctrl+H is a common shortcut for Search and Replace (e.g. in Word and
> Outlook). So it would be probably sound for an addon doing a different
> action to bind it to different key.

Indeed. This is working as designed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: