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

Show subtools with right or control click #1955

Closed
wants to merge 1 commit into from

Conversation

ollimeier
Copy link
Collaborator

Fixes #1953

I first had the following code

        window.addEventListener("mousedown", globalListener, false);
        window.addEventListener("keydown", globalListener, false);

part of showSubTools to reduce duplicate code as much as possible, but I removed it again, because I believe it's more clear this way.

@justvanrossum
Copy link
Collaborator

Hm, this doesn't look so good: I don't think we can guarantee that the "global listener" is removed. The original code is already quite dodgy, and this adds to it.

Do you remember why we need this global listener in the first place?

@ollimeier
Copy link
Collaborator Author

Hm, this doesn't look so good: I don't think we can guarantee that the "global listener" is removed. The original code is already quite dodgy, and this adds to it.

Do you remember why we need this global listener in the first place?

We hide the subtools with the globalListener: So, if we don't focus the tools anymore, either by clicking somewhere else or if we hit the escape key.

@justvanrossum
Copy link
Collaborator

Superseded by #1956

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

Successfully merging this pull request may close these issues.

[editor] Subtools right-click / control-click should open the subtools
2 participants