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

Preview Window opens and immediately closes #77

Open
robinsiebler opened this issue Aug 2, 2020 · 6 comments
Open

Preview Window opens and immediately closes #77

robinsiebler opened this issue Aug 2, 2020 · 6 comments
Labels
not reproducible Described behavior can not be reproduced (yet)

Comments

@robinsiebler
Copy link

I am running the latest version of PyCharm: 202.6397.98.

This plugin used to work perfectly, but with the latest build, I am seeing the following behavior:
At first, the preview window will open normally, but after clicking on 3-5 different files, the preview window will open and then immediately close. Re-launching PyCharm makes it work again (for the 3-5 files).

@SeeSharpSoft
Copy link
Owner

@robinsiebler Thanks for reporting!

I installed the mention version of PyCharm (Community) and gave it a try but I couldn't reproduce the mentioned issue - see screencast (I also checked keyboard navigation while testing):
quick-file-py-202

Can you provide further details to narrow down the problem?

@SeeSharpSoft SeeSharpSoft added the not reproducible Described behavior can not be reproduced (yet) label Aug 8, 2020
@robinsiebler
Copy link
Author

Here is a video of me reproducing the issue. Please let me know what other info you need.

My Movie.mp4.zip

@SeeSharpSoft
Copy link
Owner

SeeSharpSoft commented Aug 8, 2020

I noticed that the focus in your project view always jumps back to the parent directory, which causes the preview to close. This behavior is wanted but can be adjusted in the settings.

However, the actual question is: Why is the parent directory node automatically focused? Is it a plain directory or some kind of group node? Can you think of any other setting or plugin that leads to this behavior? I am not used to PyCharm, and have no explanation at the moment for the focus change.

@robinsiebler
Copy link
Author

I think I might know the cause. I installed another plugin after your plugin and perhaps the two are competing somehow? I did a small amount of testing and with both plugins enabled I see the behavior displayed in the video and with ContextBuddy disabled, I do not see that behavior

@terry-au
Copy link

terry-au commented Aug 12, 2020

I am experiencing this loss of focus issue too. It mostly happens when I switch between apps, e.g. from Firefox to IntelliJ or AppCode. It only started happening after updating IntelliJ to 2020.2. It doesn't always happen. I've found that having the IDE on one monitor and a browser on the other seems to trigger it at least once, but it is difficult to replicate multiple times.

Settings are as follows:
image

Project view settings:
image

Edit, able to reproduce using the following steps:

I have all other downloaded plugins disabled, except Quick File Preview.

Pretty much navigate around with the keyboard for a bit, then click a directory to expand it, it will have no effect and instead will jump to the previous file.
bug.mov.zip

Having "Always Select Opened File" seems to make this plugin pretty troublesome, as the scroll location in the Project panel shifts to the previewed file when you click a directory to expand it.

@SeeSharpSoft
Copy link
Owner

@terry-au Thanks for your investigation - I do understand now what is happening in your described scenario.

Having "Always Select Opened File" seems to make this plugin pretty troublesome, as the scroll location in the Project panel shifts to the previewed file when you click a directory to expand it.

You hit the nail on the head: When this option is enabled, as well as the Quick File Preview setting Close tab if no file is selected (e.g. directory or structure node selected), the current preview will be closed when clicking on a directory to expand/collapse it - and when the next tab gets focused, the file is also selected in the project view due to Always Select Opened File.

It seems that the only viable way to solve this, is to ignore the mentioned Quick File Preview setting in case Always Select Opened File is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not reproducible Described behavior can not be reproduced (yet)
Projects
None yet
Development

No branches or pull requests

3 participants