GithubHelp home page GithubHelp logo

Comments (3)

WarlockD avatar WarlockD commented on June 9, 2024

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

from term.js.

WarlockD avatar WarlockD commented on June 9, 2024

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.

from term.js.

insoln avatar insoln commented on June 9, 2024

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

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

from term.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.