-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Suggestion box incorrectly offset with translate animated container #2793
Comments
Here's much simpler example: And then try to hover or type something (edited by @hediet) |
@alexdima Do you have any estimations on how much time can the fix take? It's quite a critical issue for us as we're trying to render the editor inside a draggable panel. Maybe I can help with the PR if you give me some guidance and keywords? |
@promeris @alexdima Fixed elements inside transformed parents are positioned relatively to those transformed parents and not the body. http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms ...
fixedOverflowWidgets: true,
overflowWidgetsDomNode: document.getElementById('monaco-editor-overflow-widgets-root')!,
... <body>
...
<div id="monaco-editor-overflow-widgets-root" class="monaco-editor" style="z-index: 999;"></div>
</body> It looks like a legal way to escape transformed subtree. Anyway if you want your widgets to be fixed it doesn't matter where exactly in DOM they will be rooted (if the root is not transformed 😅). |
Thanks for the information! They are super helpful. Please use the following playground link for reproduction.
Could anybody help to fix it? |
@xloc this has been recently improved via microsoft/vscode#198730 . Could you please try with the latest editor nightly version? |
Thanks for the reply, @alexdima ! Can I ask how to access the latest version? I tried the latest version on the playground site though, which is |
Sorry about that, we're having a hiccup with the nightly build, the |
no problem at all. Thanks for your support! I can take a look later. BTW, do you know typically how long a bug will take to be merged into the stable version? or where can I get this kind of info? |
We typically release a new editor version at the same time with a vscode release. |
For anyone facing that issue on older monaco-editor versions: I managed to workaround this issue by removing all properties that lead to new stacking context. We show monaco editor inside a popup which has an enter animation with opacity so I'm removing |
Issue seems to persist in 0.47.0. Any updates? |
When displaying monaco editor in a container that is slided into screen via translate animation, the suggestion box is offset incorrectly by (width of screen - width of container). Disabling the
fixedOverflowWidgets
option is not something we can do, as the suggestion box would be cut at editor length.monaco-editor version: 0.30.0
Browser: Chrome Version 90.0.4430.93
OS: Ubuntu
Playground code that reproduces the issue:
The text was updated successfully, but these errors were encountered: