Bug 396192

Summary: Activating dictionary plasmoid should focus on input field and select text
Product: [Plasma] kdeplasma-addons Reporter: Karl Ove Hufthammer <karl>
Component: dictionaryAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: normal CC: bugseforuns, epost.kde, nortexoid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Karl Ove Hufthammer 2018-07-05 09:37:39 UTC
When one opens the dictionary plasmoid, the input field should automatically get focus and the text in the input field should be selected, so that it’s fast and easy to enter a new word to look up, without having to use the mouse. Currently, the focus from the last interaction is used, AFAICS.

Steps to reproduce:
  1. Add dictionary plasmoid (as an icon) to a panel.
  2. Click the dictionary icon.
  3. Write something in the input field and press ‘Enter’ to get search results.
  4. Click somewhere in the search results (text or link), so that that the input field loses focus.
  5. Click outside the dictionary plasmoid to close it.
  6. Click the dictionary icon again. Note that the input field is now *not* selected*.
(  7. Right-click on icon, configure, enter a keyboard shortcut and close.)
(  8. Open the plasmoid using the keyboard shortcut and observere the same behaviour as in 6.)

Expected behaviour:
  6. When clicking the dictionary icon, the input field should be selected. If it has any text, the text should be selected (so that it’s automatically deleted when one starts typing).
Comment 1 Patrick Silva 2018-08-05 19:58:10 UTC
Reproducible on Arch Linux, plasma 5.13.4.
Comment 2 Øystein Steffensen-Alværvik 2018-08-18 10:46:55 UTC
Alternatively, or in addition, make Ctrl+L select the search field (as is the behaviour in Dolphin, Konqueror…)
Comment 3 Michael D 2019-01-15 08:34:46 UTC
I would much prefer that it automatically select the text and focus the text field than having to use a hotkey combination (or mouse) to do so. I suppose that most people will want to enter a new search when they invoke the widget.