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

Can't select text inside a terminal #758

Closed
andfoy opened this issue Jul 5, 2017 · 11 comments
Closed

Can't select text inside a terminal #758

andfoy opened this issue Jul 5, 2017 · 11 comments

Comments

@andfoy
Copy link
Contributor

andfoy commented Jul 5, 2017

While testing selection features for spyder-terminal, we actually found that is not possible to select text displayed inside a xterm container, we actually performed tests on Firefox, Chrome and also Qt Webkit/WebEngine, without any success. We can't use the features implemented on PR #670

We don't know if we are missing some parameter at our xterm initialization routine: spyder-terminal/server/static/js/main.js

Details

  • Browser and browser version: Firefox 54, Chrome 59
  • OS version: Linux
  • xterm.js version: 2.8.0

Steps to reproduce

  1. Try to select text displayed inside a .terminal container
@Tyriar
Copy link
Member

Tyriar commented Jul 5, 2017

Did you fork xterm.css and not update it?

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

No, actually we're using the one that comes with the release package

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

But I've made some style-related modifications:

#terminal-container {
    height:100vh;
    margin:     0px;
    padding:    0px;
    z-index: 255;
}

#terminal-container .terminal {
    background-color: #000;
    color: #fafafa;
    padding: 0px;
    font-family: 'Ubuntu Mono', monospace;
    height:100%;
    font-size: 1em;
    line-height: 1 !important;
}

Do they modify any xterm specific behavior?

@Tyriar
Copy link
Member

Tyriar commented Jul 5, 2017

Does it have these styles?

.terminal .xterm-selection {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

.terminal .xterm-selection div {
    position: absolute;
    background-color: #fff;
}

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

I think this problem is related to my z-index values, .xterm-selection has a value of 1, whereas #terminal-container has a value of 255, does this setting interfere?

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

I'll try to perform a test

@Tyriar
Copy link
Member

Tyriar commented Jul 5, 2017

@andfoy #terminal-container probably wouldn't affect it as it's a parent. Inspect the DOM and see if the selection elements are there, that should identify the problem.

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

@Tyriar I've updated our sources to the last version, and selection is working again! It was our fault, sorry for the inconveniences.

@andfoy andfoy closed this as completed Jul 5, 2017
@andfoy andfoy reopened this Jul 5, 2017
@andfoy andfoy closed this as completed Jul 5, 2017
@Tyriar
Copy link
Member

Tyriar commented Jul 5, 2017

@andfoy good to hear, was the issue just out of date xterm.css or lib/ files or something?

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

Yes! The CSS and JS sources were out-of-date, also we had some problems with Cache on Qt, but they are now solved

@andfoy
Copy link
Contributor Author

andfoy commented Jul 5, 2017

@Tyriar Thanks for your help

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

2 participants