Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse click behaviour when changing focus is weird #327

Open
pauxus opened this issue Jun 6, 2014 · 7 comments
Open

Mouse click behaviour when changing focus is weird #327

pauxus opened this issue Jun 6, 2014 · 7 comments

Comments

@pauxus
Copy link

pauxus commented Jun 6, 2014

I just noticed a rather weird behaviour in Sublime 3, on Windows 7 64bit.

When the I have focus in a different window (for example to copy something), and I click back into the Sublime window, the window gets the focus, after a fraction of a second, the cursor is placed in the text, but not on the place where the window was clicked but rather where the mouse cursor is NOW, a split second later.

So you click in the window, you continue moving the mouse after the click, and the cursor appears at a completely different place. This hampers fast working with two windows a lot.

This is even worse when trying to select something using the mouse, because in that case, you HAVE to move the cursor:

Steps to reproduce:

  • Enter a String (say "This is my test string")
  • select a different (non Sublime) window
    -Now try to select the whole sentence with a the mouse (without previously focusing the editor) in one fast motion.

Expected behaviour: Whole string is selected
Actual Result: only part of the string is selected (The part of the timeframe between clicking and the setting of the focus is missing)

@FichteFoll
Copy link
Collaborator

Can not reproduce and never occured to me, same OS.

Does this also happen without Plugins? Do you have any tools running that intercept window focus handling?

@pauxus
Copy link
Author

pauxus commented Jun 6, 2014

No tools, but I tried cleaning all plugins, you are correct, problem does not appear anymore. I will look for the culprit plugin. Thanks.

@pauxus pauxus closed this as completed Jun 6, 2014
@titoBouzout
Copy link
Collaborator

I see the weird mouse behaviour all the time, reproducible. I'll give information later. Probably some of these are unrelated to each other, but everything falls into this "mouse click acts strange"

@pauxus pauxus reopened this Jun 6, 2014
@pauxus
Copy link
Author

pauxus commented Jun 6, 2014

It seems not to be related to a specific plugin, but rather the the amount of active plugins.

@titoBouzout
Copy link
Collaborator

This is sometimes reproducible in many situations when returning to get focus:

  • Click a tab, sometimes the tab gets detached from the tabbar because of that delay described in item0
  • Switch focus between ST windows, when text is selected, and you target your click at the selection, click acts weird.
  • Switch focus between a panel and a view (for example the F&R and another tab), if some of these have text selected, in some situations acts strange..

I remember this used to be worse, so is pretty trivial, but very annoying.

A practical example:
1 Open two windows, next to each other
2 select window 1
3 Type or copy and paste "CLICK HERE"
4 Triple click or select all the "CLICK HERE" text
5 focus window 2, and write something
6 Now focus windows 1 trying to click the text "CLICK HERE".

You will notice the clicked text /wants to be dragged. Something similar happens with the tabs, but there is worse because the tab gets detached and creates a new window.

https://dl.dropboxusercontent.com/u/9303546/SublimeText/bugs/focus.png

@titoBouzout
Copy link
Collaborator

I change it to from invalid to bug trivial.

@titoBouzout
Copy link
Collaborator

This is related to drag_text setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants