[squeak-dev] Possible bug in PluggableTextMorph: Selection is reversed when rehovering text

Christoph Thiede christoph.thiede at student.hpi.uni-potsdam.de
Fri Aug 2 16:37:03 UTC 2019


Hi,

I will quote the bug report from  here
<https://github.com/MrModder/Autocompletion/pull/25#issuecomment-513546349> 
:

> - Open a workspace window, enter some text
> - press shift+left once
> - set the keyboard focus to another window
> - bring focus back to the Workspace
> - press shift+left once again
> Instead of selecting two characters, zero characters will be selected

The reason is in PluggableTextMorph>>#mouseEnter:, where the following is
done:
...textMorph editor selectInterval: selectionInterval...
As the selectionInterval is always positive, this operation destroys any
editor state where pointIndex < markIndex.

I just disabled this section in my image, and in a rush, I could not find
out what is missing. What has been the purpose of this snippet?
I also see this might be a debatable behavior: On the one hand, the user
might be irritated when he is returning to a textmorph after a long time,
trying to extend the selection with <shift>Arrow right but the selection is
shrinked indead. On the other hand, I have activated the
#mouseOverForKeyboardFocus setting (which is basically genius) and find it
annoying that the selection behavior changes after repositioning your mouse.
Has this ever been debated before?

I would welcome your opinions!

Best,
Christoph



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list