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

The input gets stuck when typing JS code in the tests section #7092

Open
1 task done
kolindes opened this issue Feb 15, 2024 · 2 comments · May be fixed by #7280
Open
1 task done

The input gets stuck when typing JS code in the tests section #7092

kolindes opened this issue Feb 15, 2024 · 2 comments · May be fixed by #7280
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@kolindes
Copy link

kolindes commented Feb 15, 2024

Expected Behavior

When writing tests, text input feels just the same as in any text editor -- freely

Actual Behavior

When entering js in the test section, the cursor seems to get stuck and doesn't allow you to enter a space/next characters until you press ESC

Reproduction Steps

  1. Open TESTS section
  2. Start writing code let test = 1;

Is there an existing issue for this?

Additional Information

When I write code like let(here I press space), the space doesn't get entered, instead, a suggestion box might appear saying "send: ...", and sometimes it might not appear.

2024-02-15 152840

Insomnia Version

8.6.1

What operating system are you using?

Windows

Operating System Version

windows 10 pro 19045.3570 22h2

Installation method

downloaded release for win platform from repo

Last Known Working Insomnia version

8.5.1

@kolindes kolindes added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Feb 15, 2024
@kolindes kolindes changed the title When writing code in the TESTS section the cursor gets stuck The input gets stuck when typing JS code in the tests section Feb 15, 2024
@SimplexShotz
Copy link

SimplexShotz commented Apr 19, 2024

The issue occurs due to the use of the <ListBox> and <ListBoxItem> elements inside of test-suite.tsx. They appear to be capturing the space event (on occasion) before the keydown event fires within the CodeEditor textara somehow.

Unless someone can figure out how to prevent this event from being captured (as far as I can tell, there is no attribute/option to prevent this behavior), the best solution to this problem is to use an alternative container. For example, using a basic <div> instead of a <ListBox> solves the issue.

I'll attach a pull request to this thread; however, do be aware that using a <div> breaks the drag & drop (reordering) feature that was introduced by #7020. There are other ways to "reintroduce" this feature using <div> elements, and I would love to, but this is outside of my area of expertise.

@SimplexShotz SimplexShotz linked a pull request Apr 19, 2024 that will close this issue
@Baklap4
Copy link

Baklap4 commented May 3, 2024

This basicly breaks writing tests entirely and currently prevents us from automating the testing of our apis...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants