Bug 307052 - Code completion items should be executed when clicking on an item in the dropdown list
Summary: Code completion items should be executed when clicking on an item in the drop...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources All
: HI wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 15:00 UTC by fsmoreir
Modified: 2016-03-22 06:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fsmoreir 2012-09-19 15:00:08 UTC
when  auto completetion for latex markup  is activated, if we write \begi a dropdown list is shown to complete the command.  If you use mouse to select a item from this list, the list disappears, but the corresponding completation is not written to the document.  However if you use arrows up/down to select and then press enter, the selected word  is written to thedocument.  
 

Reproducible: Always

Steps to Reproduce:
1.turn on auto completion, by checking the "auto completetion for latex markup" box in settings->configure kile->kile->complete
2. In a document write "\begin"
3. in the popup dropdown window try a mouse click in one item 
Actual Results:  
The dropdown window closes, but the item clicked is not written to the document.


Expected Results:  
The item clicked is written to the document.

My actual kile version is 2.9.60, but this also happened in earlier vrsions i´ve tried.
Comment 1 Michel Ludwig 2012-09-19 18:08:29 UTC
Forwarding to KatePart.
Comment 2 Travis Evans 2014-08-07 14:17:26 UTC
I see this in Kate 3.13.2, but the list remains when clicking an item.  More specifically, clicking only highlights the item.  It turns out that double-clicking will complete the item, but I only realized this was possible after reading through older bug reports.

This is perhaps a usability issue.  The drop-down list looks like a pop-up menu to me, so I would expect single-clicking to complete an item.  I never even thought of double-clicking, since one does not normally double-click to select an item in a menu.
Comment 3 Kevin Funk 2016-02-12 22:52:59 UTC
This also breaks KDevelop. I'm surprised noone has worked on this issue yet?
Comment 4 Kåre Särs 2016-03-22 06:54:54 UTC
Git commit b37afce47ef23e497aea14aa15243c88366bbcc3 by Kåre Särs.
Committed on 22/03/2016 at 06:48.
Pushed by sars into branch 'master'.

Fix selecting completion item with the mouse

Prevents closing of the popup when the view looses focus to the popup,
adds closing of the popup when it looses focus and returns the focus
to the view when the popup is closed in case it had focus.
REVIEW: 127444

M  +13   -0    src/completion/katecompletionwidget.cpp
M  +2    -1    src/completion/katecompletionwidget.h

http://commits.kde.org/ktexteditor/b37afce47ef23e497aea14aa15243c88366bbcc3