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

"focus" class on terminal creates an empty rectangle #8158

Closed
ghokun opened this issue Jul 12, 2020 · 10 comments · Fixed by #8204
Closed

"focus" class on terminal creates an empty rectangle #8158

ghokun opened this issue Jul 12, 2020 · 10 comments · Fixed by #8204
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help terminal issues related to the terminal

Comments

@ghokun
Copy link

ghokun commented Jul 12, 2020

Bug Description:

Terminal has an empty rectangle when focused.
terminal

Steps to Reproduce:

  1. Run with: docker run -it --init -p 3000:3000 -v "$(pwd):/home/project:cached" theiaide/theia:latest
  2. Open a browser and browse to :3000
  3. Press Terminal -> New Terminal
  4. Press anywhere on Terminal to focus

Additional Information

  • Operating System:
    Running with docker image theiaide/theia:latest and theiaide/theia:next
    Browsing with Windows 10 Firefox Developer Edition, Edge
    Browsing with Mac OS Catalina Safari
  • Theia Version: next, latest
@vince-fugnitto vince-fugnitto added help wanted issues meant to be picked up, require help terminal issues related to the terminal labels Jul 13, 2020
@akosyakov
Copy link
Member

akosyakov commented Jul 14, 2020

I wonder whether it is the shell issue somehow or xtermjs. Usually it is a good idea to try to reproduce such issues outside of Theia with the system terminal or maybe in VS Code.

@akosyakov akosyakov added 🤔 needs more info issues that require more info from the author bug bugs found in the application labels Jul 14, 2020
@ghokun
Copy link
Author

ghokun commented Jul 14, 2020

Let me know how i can help.

NexediGitlab pushed a commit to SlapOS/slapos that referenced this issue Jul 15, 2020
When updated to 4.8.1 the cursor "shadow" rendering is incorrect

workaround for eclipse-theia/theia#8158
@perrinjerome
Copy link
Contributor

I could narrow down that this happens with xterm 4.8.1 and that it did not happen with 4.6.0 ( I have not tried versions in between )

It's really annoying because the rectangle moves as you type :
theia-terminal

@ghokun
Copy link
Author

ghokun commented Jul 15, 2020

Looks like 4.7.0 does not have this problem.

image

@perrinjerome
Copy link
Contributor

isn't xtermjs/xterm.js#2996 (comment) the same thing ?

@akosyakov
Copy link
Member

@perrinjerome it seems that xtermjs/xterm.js#2996 (comment) is a part of 4.8.1?

@akosyakov akosyakov removed the 🤔 needs more info issues that require more info from the author label Jul 15, 2020
@ghokun
Copy link
Author

ghokun commented Jul 15, 2020

I fixed my build with a resolutions block in package.json
https://github.com/ghokun/theia-cv/blob/master/package.json

@perrinjerome
Copy link
Contributor

@akosyakov this problem started with 4.8.0

if I understood correctly, xtermjs uses a textarea for input methods and this textarea is the empty rectangle we can see here. With xterm's css, this textarea is supposed to be invisible with this opacity: 0 rule and also out of the screen with this left: -9999em; rule.

There's this rule in theia's css, which sets opacity: 1 for all :focus elements:

:focus {
outline-width: 1px;
outline-style: solid;
outline-offset: -1px;
opacity: 1 !important;
outline-color: var(--theia-focusBorder);
}

That rule applies on xterm textarea, but with <= 4.7.0, it's was OK because the textarea was anyway outside of the screen with the left: -9999em rule.

The changes from xtermjs/xterm.js#2996 were about making the textarea appear next to the cursor, by setting the position with style attributes of the element, so it's now visible, because of theia's opacity rule.

xterm 4.7.0:

image

xterm 4.8.0:

image

Maybe theia does not need such a global rule as this :focus { opacity: 1!important } ?

opacity: 1 !important;

at least if I disable this rule, everything seems OK with xterm 4.8.0.

@ghokun
Copy link
Author

ghokun commented Jul 16, 2020

A similar rectangle occurs under mouse pointer, when right click is pressed in terminal area with xterm 4.7.0. (Could not capture the mouse pointer)
image

vince-fugnitto added a commit that referenced this issue Jul 20, 2020
Fixes: #8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto
Copy link
Member

A similar rectangle occurs under mouse pointer, when right click is pressed in terminal area with xterm 4.7.0. (Could not capture the mouse pointer)

The bug occurs for xterm context-menus in electron, it should be fixed once the following issue is implemented (a proper context-menu for terminals with the following menu items). In the meantime, perhaps we can prevent the display of the empty "context-menu" as shown in the screenshot.

vince-fugnitto added a commit that referenced this issue Jul 20, 2020
Fixes: #8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
NexediGitlab pushed a commit to SlapOS/slapos that referenced this issue Jul 21, 2020
When updated to 4.8.1 the cursor "shadow" rendering is incorrect

workaround for eclipse-theia/theia#8158
minyoungyang pushed a commit to minyoungyang/theia that referenced this issue Aug 4, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 8, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 9, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 29, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 30, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 30, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Sep 30, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Nov 4, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Nov 4, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
westbury pushed a commit to ARMmbed/theia that referenced this issue Nov 4, 2020
Fixes: eclipse-theia#8158

The following commit addresses an issue with newer versions of `xterm`
which displayed a secondary cursor-like border due to our global
`:focus` class. The fix updates the xterm textarea to force an opacity
consistent with their sources.

Signed-off-by: vince-fugnitto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help terminal issues related to the terminal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants