Skip to content

Don't dismiss dialogs when focusing - #2488

Merged
shiftkey merged 7 commits into
masterfrom
dont-dismiss-me-bro
Aug 21, 2017
Merged

shiftkey merged 7 commits into
masterfrom
dont-dismiss-me-bro

Conversation

@joshaber

Copy link
Copy Markdown
Contributor

Fixes #2486

This is a hack. I'm open to better ideas, but I couldn't find a way to associate the click event with the focus event 😞

/** The time (in milliseconds) that we should wait after focusing before we
* re-enable click dismissal. Note that this is only used on Windows.
*/
const DisableClickDismissalDelay = 500

This comment was marked as spam.

@joshaber joshaber added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 17, 2017
@joshaber

Copy link
Copy Markdown
Contributor Author

🏷 🍔

/** The time (in milliseconds) that we should wait after focusing before we
* re-enable click dismissal. Note that this is only used on Windows.
*/
const DisableClickDismissalDelay = 500

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/ui/dialog/dialog.tsx Outdated

this.disableClickDismissal = true

setTimeout(() => {

This comment was marked as spam.

This comment was marked as spam.

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As this is a relatively isolated chunk of hack, I think I'm fine with pulling this in.

@shiftkey
shiftkey merged commit 02847db into master Aug 21, 2017
@shiftkey
shiftkey deleted the dont-dismiss-me-bro branch August 21, 2017 04:03
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.

3 participants