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

Hover popups getting stuck open #760

Open
nicoburns opened this issue Oct 12, 2020 · 14 comments
Open

Hover popups getting stuck open #760

nicoburns opened this issue Oct 12, 2020 · 14 comments

Comments

@nicoburns
Copy link

nicoburns commented Oct 12, 2020

The (very helpful) TypeScript hover popups are getting stuck open. This doesn't happen every time, but often enough (maybe once every 5 minutes or so) to be really annoying. The only way to get rid of them once they get into this state seems to be to close the entire window (or quit sublime text completely): they persist through scrolling, clicking, pressing escape, and even closing the tab. See the video capture below:

sublime-text-typescript-popups-stuck

I'm running the latest ST4 build (4088) if that is relevant.

@nicoburns nicoburns changed the title Popups getting stuck open Hover popups getting stuck open Oct 12, 2020
@turbo
Copy link

turbo commented Oct 12, 2020

Repro'd with ST4 on Ubuntu. Sometimes many (dozens) are stacking over each other when navigating within one function header.

Also, this isn't intermittent. I just need to actually write a function (e.g. .forEach(, console.log( etc), which will of course always trigger the popup which will then get stuck (always).

@ro-ka
Copy link

ro-ka commented Oct 16, 2020

Same on Mac, latest build (4088). Not sure but I think it emerged with build 4087.

See stacking:
st4-hints

@jamwaffles
Copy link

I've been having this issue for a while too. I left a bug report at sublimehq/sublime_text#3719 which describes a repro case if anybody needs that for testing.

@nicoburns
Copy link
Author

For anyone else encountering this issue: I was able to work around it by replacing this TypeScript plugin with lsp, lsp-typescript, and TypeScript-Syntax which combine to give similar functionality. Bonus: this plugin was using ~40% cpu per instance on my MacBook, whereas the lsp version doesn't seem to have that issue.

@wbond
Copy link

wbond commented Nov 30, 2020

My hunch would be some interplay with re-displaying the popup in the on_hide callback:

cursor_region = self.current_view.sel()[0]
arg_regions = self.current_view.get_regions('argSpan')
if len(arg_regions):
argSpan = self.current_view.get_regions('argSpan')[0]
if argSpan.contains(cursor_region):
log.debug('Was hidden while in region. Redisplaying')
# Occurs on cursor movement. Rerun to redisplay popup.
self.display()

If someone has this toolchain setup and wouldn't mind some debugging, that could be useful to know.

Most likely there is some interplay between the code in this plugin and code that is causing these to remain stuck open.

@iahu
Copy link

iahu commented Dec 3, 2020

Can i bind a key to hide all popup ?

@wbond
Copy link

wbond commented Jan 22, 2021

It did end up being an issue that showing a popup in the hide callback was the issue. We've solved this in core with build 4095.

@hrasekj
Copy link

hrasekj commented Feb 8, 2021

I'm still having this issue on ST4 build 4097.

@wbond
Copy link

wbond commented Feb 8, 2021

I'm still having this issue on ST4 build 4097.

If you can open an issue on our issue tracker with exact steps to reproduce, that would be helpful. Please be sure to include steps on how to configure the plugin appropriately and source code that will trigger it. In other words, try to make it so someone who doesn't use TypeScript can reproduce easily.

@hrasekj
Copy link

hrasekj commented Feb 8, 2021

It did end up being an issue that showing a popup in the hide callback was the issue. We've solved this in core with build 4095.

@wbond now I'm not sure if I got correctly what you said.

Are you sayng, that you fixed issue with popup hide callback in ST core build 4095, and hence fixed this issue with hovering popups, or just fixed popup hide callback, so its possible to fix this issue?

Becouse if it's second option my comment have no point at all and there is no need to open issue.

@wbond
Copy link

wbond commented Feb 8, 2021

As far as I know, the "stuck" popups were fixed in build 4095. Before build 4095, if a plugin called show_popup() in the on_hide callback, a reference to the popup would be lost, and thus it would be stuck open. The bug I identified should be fixed in build 4095.

Your comment said you've experienced this in build 4097, so I am asking if you can open an issue with a way to reproduce.

Depending on what you are seeing, it could be a Sublime Text issue, or not. If you can get more than one popup open at a time, that would indicate a bug in Sublime Text. If the issue is that in TypeScript it keeps popping the window open, you may be running into the issue that this plugin will re-show its popups in the on_hide handler sometimes.

@oprearocks
Copy link

oprearocks commented Apr 6, 2021

@wbond I managed to get multiple popups to open (and remain stuck) at the same time.

Screenshot 2021-04-07 at 12 37 55 AM

Later edit:

10 minutes after publishing this I got an update to Build 4101 and I can still reproduce the issue.

image

@wbond
Copy link

wbond commented Apr 6, 2021

If you want to post an issue with some steps to reproduce on our issue tracker I can help.

@oprearocks
Copy link

Thanks for being so quick @wbond . Created this issue ⬆️

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

No branches or pull requests

8 participants