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

Strange behavior for widgets after setting fixedOverflowWidgets: true #2229

Closed
hacker0limbo opened this issue Nov 23, 2020 · 5 comments
Closed
Labels
editor-hover info-needed Issue requires more information from poster

Comments

@hacker0limbo
Copy link

monaco-editor version: 0.21.0
Browser: Chrome
OS: MacOS
Playground code that reproduces the issue:

To fix some layout issue, i just give monaco editor parent container with overflow: hidden, and give fixedOverflowWidgets: true when setup the monaco editor to try to solve widgets display issue. However my editor behaves strangely for all related widgets. Because of some reason i am not able to show code, the screenshot are listed:

Before i set fixedOverflowWidgets: true, since i am adding overflow: hidden, this behaves normally(widgets get hidden) as expected:
Screen Shot 2020-11-19 at 8 41 30 PM

After i add fixedOverflowWidgets: true try to solve problems caused by overflow: hidden:

Screen Shot 2020-11-23 at 3 32 04 PM

Screen Shot 2020-11-23 at 3 31 31 PM

Although The suggestion widgets and hover widgets can fully displayed, the are now moving far away from my text input. I have no idea why this happens. Is there any solutions to fix this behavior or is there alternative ways to solve widgets displaying problems when i am setting overflow: hidden to the parent element of monaco editor?

Cheers!

@alexdima
Copy link
Member

@hacker0limbo Can you please provide a sample on how you are instantiating the editor? You can use one of the samples at https://github.com/microsoft/monaco-editor-samples and modify it to illustrate the usage.

@alexdima alexdima added the info-needed Issue requires more information from poster label Dec 30, 2020
@hacker0limbo
Copy link
Author

@alexdima well i think i solved the problem. Although i am not sure what cause it but now everything works well. Thanks for your comment and this project, gonna close this issue.

@weizhang-ms
Copy link

@hacker0limbo may I ask how you fixed this? I'm placing monaco-editor inside fluent Callout control and see the same behavior

@hacker0limbo
Copy link
Author

@hacker0limbo may I ask how you fixed this? I'm placing monaco-editor inside fluent Callout control and see the same behavior

@weizhang-ms hello, actually i didn't solve it perfectly, what i did was avoid using fixedOverflowWidgets: true and conditionally set overflow: hidden. It's a little bit complicated to explain this since there is no context and sample code provided. A pseudo code in my project might looks like this

if (conditionA && B && c) {
  // set overflow: hidden 
} else {
  // don't touch this attribute
}

It's been a while ago since i encountered this issue, i am not sure if they fix it, and hope this helps. If you still unsure what to do, open a new issue with more details and providing some sample code, they will give you advice immediately.

@turbozv
Copy link

turbozv commented May 27, 2021

@hacker0limbo I see, thanks for the info!

I created a new issue with sample repro code: #2503

@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-hover info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants