rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Ghost selectiona after clearing selection in code explorer search #4843

Open bclothier opened 5 years ago

bclothier commented 5 years ago

Rubberduck version information Version 2.4.0.32433 OS: Microsoft Windows NT 6.1.7601 Service Pack 1, x64 Host Product: Microsoft Office 2010 x86 Host Version: 14.0.7195.5000 Host Executable: MSACCESS.EXE

Description When clearing the search box using keyboard, the selection does not change as expected

To Reproduce Using code explorer's search:

1) type in some random input. The content of the input does not matter. image

2) Select it, whether by the mouse or by keyboard (ctrl + home, assuming cursor is at the end) and press delete.

3) We end up with a ghost selection that is no longer there. image

Note that the search functionality is unaffected; this is purely a UI glitch.

comintern commented 5 years ago

Ref #4749 - I don't see this behavior on Windows 10. This appears to be due to the method used for setting focus back to the text box.

https://github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Core/UI/Controls/FocusElementAfterClickBehavior.cs#L28

bclothier commented 5 years ago

I still can reproduce on Windows 10....

IvenBach commented 4 years ago

I just tested this on two separate Win10 machines without issue, @bclothier can you reproduce the behavior?