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

Cursor bug #651

Closed
hoodmane opened this issue Feb 25, 2021 · 4 comments
Closed

Cursor bug #651

hoodmane opened this issue Feb 25, 2021 · 4 comments
Labels
Bug critical resolved if issue is resolved, it will be open until merge with master

Comments

@hoodmane
Copy link
Contributor

hoodmane commented Feb 25, 2021

Cursor disappears / gets stuck in first position. Further text is inserted in reverse.

To trigger

Make a website with the source given at the bottom of this post. Go to the website, put two characters in row one and one character and row two. So for instance "12<SHIFT+ENTER>3" then press Up, Down, Up, Down. The cursor will disappear and text will be inserted backwards at the start of the input region.

After triggering the bug with that sequence of keystrokes I typed " backwards text is here!" and made the following screen shot:

image

Using the following html:

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Test</title>
    <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css" rel="stylesheet"/>
</head>
  <body>
    <script type="module">
      window.term = $("body").terminal(
        (command) => {}, 
        { prompt : "" }
      );
    </script>
  </body>
</html>
@jcubic
Copy link
Owner

jcubic commented Feb 25, 2021

That's really odd, will investigate.

@jcubic
Copy link
Owner

jcubic commented Feb 25, 2021

I can confirm the position got outside of the range.

@jcubic
Copy link
Owner

jcubic commented Feb 25, 2021

The problem what that the prompt was empty variable prompt_len was undefined and it give wierd results when you press up and down arrows.

@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Feb 25, 2021
@hoodmane
Copy link
Contributor Author

Thanks!

@jcubic jcubic closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug critical resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

2 participants