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

Issues in IE 10 browser #33

Open
shashank-anantapalli opened this issue May 29, 2014 · 3 comments
Open

Issues in IE 10 browser #33

shashank-anantapalli opened this issue May 29, 2014 · 3 comments

Comments

@shashank-anantapalli
Copy link

I see following issues when used term.js in IE 10 browser.

  1. Scroll bar does not work in IE 10 browser.

  2. When ever space bar is used to load more information focus is being out from the terminal to enter next command or to click space bar again, focus has to be brought back to the terminal by clicking on the terminal using mouse click.

@WarlockD
Copy link

I don't know about 1 because I haven't been using the scroll bar, but on 2, I have noticed it and have some example code.

I am building a cpu emulator in javascript and noticed that I lose focus every time I get to the end of the lines of the terminal. However its not a focus issue, it seems that the onkeydown cannot find the element that called it. I just started looking at it but thought I would post some code for it. FYI chrome works fine though.
You can see whats happening here
http://drakesmith.net/focus_test.html

Just type something and pres enter, keep typing and when it needs to scroll it will stop responding to keypresses. Only in IE10 though

@WarlockD
Copy link

Ok, I fixed my issue, sort of. I am not very good at javascript yet but I have a hack. At the end of the refresh function I put this down.

if (this.focus) self.focus();

I think what happens is that IE10 loses focus when refresh removes/adds lines in the dom even though its all still in the parent container. Checking if we had focus and then refreshing the focus fixes it.

insoln added a commit to insoln/term.js that referenced this issue May 7, 2017
@insoln
Copy link

insoln commented May 7, 2017

Proposed a solution: string 1416, instead of
if (parent) parent.appendChild(this.element);
should be

if (parent) {
  parent.appendChild(this.element);
  this.element.focus();
}

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

3 participants