Skip to content

Allow window to accept single click on focus - #3843

Merged
nerdneha merged 1 commit into
masterfrom
act-more-native
Feb 1, 2018
Merged

nerdneha merged 1 commit into
masterfrom
act-more-native

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Jan 22, 2018 •

Copy link
Copy Markdown
Contributor

This PR addresses feedback from @kevinsawicki: the window required one click to set focus and another to actually perform any useful actions.

  • Test on macOS
  • Test on Windows
  • Make sure dialogs don't respond to focus event
    • macOS
    • Windows

Before

2018-01-22 17_50_21

After

2018-01-22 17_54_45

@shiftkey

Copy link
Copy Markdown
Member

Does this make #2488 unnecessary, or is that still required?

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I don't believe it does. I think that issue was about dialogs responding to any focus event emitted by the renderer process.

@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 24, 2018
@nerdneha nerdneha assigned nerdneha and unassigned nerdneha Jan 25, 2018
@nerdneha
nerdneha self-requested a review January 25, 2018 04:41
@nerdneha

Copy link
Copy Markdown
Contributor

@iAmWillShepherd code looks fine but i'm not getting this to work on my computer

act-more-native

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I believe this changes requires a rebuild first. @nerdneha Did you rebuild the app before starting?

@nerdneha

Copy link
Copy Markdown
Contributor

it's working

@tierninho

Copy link
Copy Markdown
Contributor

Spotted this: You can right-click into the app, but the focus is still on the Finder menu.
screen shot 2018-01-31 at 1 53 41 pm

@shiftkey

shiftkey commented Jan 31, 2018 •

Copy link
Copy Markdown
Member

@tierninho that smells like an Electron issue. If it's reproducible away from Desktop, like using electron-quick-start, then we should log it upstream but still take in this change. It might have been fixed in 1.8.x.

EDIT: I'll see if I can recreate this in the same way.

EDIT 2: reported upstream: electron/electron#11800

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

@tierninho @shiftkey, turns out this behavior is present in my browser as well (Firefox). Just opened a terminal, right-clicked in my browser so that a context menu appears, and I typed a little message to myself in my terminal (iTerm2)

@shiftkey

shiftkey commented Feb 1, 2018

Copy link
Copy Markdown
Member

@iAmWillShepherd cool, so it might even be beyond Electron. Anyway, no need to hold this up.

@nerdneha
nerdneha merged commit d0dab86 into master Feb 1, 2018
@nerdneha
nerdneha deleted the act-more-native branch February 1, 2018 22:33
@zenmumbler

zenmumbler commented Feb 27, 2018 •

Copy link
Copy Markdown

A bit late to the party, but this one just shipped in 1.1.0 so I saw this just now.
Clicking once to focus window and then performing another click to act in it IS the native behaviour, at least on macOS. The actual bug / inconsistent behaviour with the GH app is that it does not show that it is inactive by greying out window chrome and interface elements, etc. This behaviour is now even more inconsistent with actual macOS apps than before. This behaviour may be different on Windows, but as far as macOS is concerned, a better name for this branch would be act-even-less-native.

To be fair, some other apps, including some of Apple's, sin in this regard as well, but just wanted to voice my concern of the ongoing dilution of native behaviour from cross-platform apps. The web, Windows and macOS act differently and look different. This is not a bad thing. Ok, rant over.

@shiftkey

Copy link
Copy Markdown
Member

@zenmumbler

The actual bug / inconsistent behaviour with the GH app is that it does not show that it is inactive by greying out window chrome and interface elements, etc.

This is an interesting bit of feedback. Would you mind opening up a fresh issue about this with an annotated screenshot of the bits that you think need to be changed, so we can track this discussion?

@zenmumbler

Copy link
Copy Markdown

Will do, will have time to do this properly later today. Thanks for the response!

@barlaipeter barlaipeter left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

@zenmumbler , I think I understand the nature of the problem. I used to native macOS apps, TextEdit and Notes. They both respond to a click when out of focus, as does Desktop now, but they also grey out the contents of the window, which Desktop does not do.

2018-02-27 11 59 29

Is my understanding correct and does this gif correctly show the problem?

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

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants