-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Fixed issue Misalignment of suggestion details widget (https://github.com/microsoft/monaco-editor/issues/3373) #198730
Conversation
@microsoft-github-policy-service agree |
…rk details overlay widgets as overflowing
…cements (since they use the absolute document's box)
@rebornix Please take a look at this and follow up (either here or separately) for notebooks. This PR changes the suggest details to not be I see that for the latter some notebook/suggest specific CSS magic is applied. This won't work for suggest details anymore because they now sit inside a different node but I also couldn't get this to work with similar tweaks ⬆️ notice how the details overflow the editor but now the editor-overflow doesn't overflow the notebook |
@GenericTSDeveloper pushed a few changes on top of yours. Thanks for starting this, I am confident that we will get this merged towards the end of this week |
@jrieken The |
Thanks @rebornix. I have now pushed support for fixed overflow overlay widgets. This works now for notebooks too. |
…Code Fixed issue Misalignment of suggestion details widget (microsoft/monaco-editor#3373)
The offset position of the suggest-widget container is calculated relative to the editor (i.e. position is set as absolute)
On the other hand, the offset position of suggest-detail container is relative to the viewport (i.e. position is set as fixed).
Per stated in the issue, there are some cases where offset are not properly calculated for the suggest-detail container. If the parent or ancestors of monaco-editor has either transform or perspective style set, then offset position will NOT be relative to the viewport (https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block#4)
One solution is to calculate the offset for the suggest-detail container relative to the editor (and set the position as absolute).
Since the position is set to absolute, (in the editor.css) the
position: relative;
must be removed in order to have suggest-detail-container shown properly (otherwise it will act as if it has low z-index)fixes microsoft/monaco-editor#3373