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

Disable macOS click-through on ST3 window #2210

Open
kakysha opened this issue Feb 28, 2018 · 6 comments
Open

Disable macOS click-through on ST3 window #2210

kakysha opened this issue Feb 28, 2018 · 6 comments

Comments

@kakysha
Copy link

kakysha commented Feb 28, 2018

Click-through is one of the things which differs macOS from other OSs. In two words, in macOS clicking on a background window (which doesn't have focus) only makes it active, without passing the click to the window itself. So you don't accidentally make unwanted action inside the app while just trying to bring the app to foreground.

Although all other apps in macOS has it disabled, currently, ST3 window has 'click-though' feature enabled, which is against Apple guidelines:

Avoid providing click-through for an item or action whose result might be dangerous or undesirable. Specifically, avoid enabling click-through for an item that:

  • Performs a potentially harmful action that users can’t cancel (for example, the Delete button in Mail)
  • Performs an action that is difficult or impossible to cancel (such as the Send button in Mail)
  • Dismisses a dialog without telling the user what action was taken (for example, the Save button in a Save dialog that overwrites an existing file and automatically dismisses the dialog)
  • Removes the user from the current context (for example, selecting a new item in a Finder column that changes the target of the Finder window)

Last point is exactly my case, as ST3 while being in background only has it's sidebar visible, so switching from Safari to ST3 only possible by clicking files/folders in ST3 sidebar, which changes currently opened file in ST3 (= switches context).

No other apps do that, they all require two clicks to perform an action when the app was in background.

Here is one poor guy asking for the same, but on windows: https://forum.sublimetext.com/t/focus-on-click-in-windows/12575

For me, click-through works for sidebar with project files/folders, also for 'vertical tabs', which are resided above project folders, also for minimap.

click-through

@keith-hall
Copy link
Collaborator

keith-hall commented Feb 28, 2018

Related: #1720 and some comments on the current support for click-through on the forums

@wbond
Copy link
Member

wbond commented Feb 27, 2019

I've spent a little time looking into this, and it doesn't seem entirely clear cut what the "correct" answer is. I just tried Safari, Calendar, Messages and some third party apps I use regularly. All of them performed a click-through and selected the item I clicked on when the app was inactive.

@websash
Copy link

websash commented Feb 27, 2019

@wbond Here's how to reproduce.

Open the native Calculator app while having Finder's window open in the background. Now click on one of the items in the Finder sidebar. It won't be selected. You'll have to click on it once again to do that. Your first click just brings the Finder window to the foreground and does nothing more. This is the desired behavior for ST.

Yes you can go to a specific tab in Safari by clicking on it even if the window is in the background but you can't click any html link inside the content window right away. Since you may perform an undesired unintended action this way

Important! You should check only the native macOS apps. 3rd party ones built with Electron may have a different (incorrect) behavior.

--
From the UX standpoint an item that supports click-through ideally should also react to mouseover indicating it's ready to receive a user action. This does not happen in ST. The close tab buttons that react to mouseover in the active window don't do this in the inactive window but still react to clicks. The same goes to the sidebar items. This makes the UI confusing. You don't know what to expect from your click. Eventually you get used to it but obviously it's not ideal.

My suggestion is to leave the click-through behavior for tabs and open files but make them react to mouseover when the window is inactive and disable click-through for sidebar items and minimap.

@kakysha
Copy link
Author

kakysha commented Feb 28, 2019

@websash I prefer disabling click-through for ST completely, as clicking in almost any spot in ST window will change the context I was in before leaving ST.
Apple guidelines state exactly about this:
* Removes the user from the current context (for example, selecting a new item in a Finder column that changes the target of the Finder window)

So clicking on open files/tabs just brings up a new file (I have tabs in sidebar btw.), instead of the file I was working on before googling, for example. I forced to press ctrl+tab every time after I return back to ST :(

@jamessimas
Copy link

I prefer disabling click-through for ST completely, as clicking in almost any spot in ST window will change the context I was in before leaving ST.

Same here. I wish clicking in the window only raised the window and did not action anything inside the window.

I wish this Apple UI guideline was better respected (in general, many other apps violate this as well, which is unfortunate).

@alexfouche
Copy link

alexfouche commented Mar 26, 2024

As far as I am concerned, I wish click-though is never forbidden, and enabled everywhere.
Inability to click-though on so many apps on macOS is currently a major pain that way too many users complain. Myself included, coming back recently to macOS, this is one of the first things that hit me, needing to click twice each time I switch with mouse from terminal, web, editor, etc... before being able to type some text.
To the point I really wonder how long-time Mac users do, or if they even realize.

And I do not care about Apple guidelines, which is preventing everyone being efficient, only because a very few people at some time in the past clicked-though a bad button

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

7 participants