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

Crash upon exiting "item edition" window with Return key #94

Closed
dracorpg opened this issue Apr 19, 2021 · 1 comment
Closed

Crash upon exiting "item edition" window with Return key #94

dracorpg opened this issue Apr 19, 2021 · 1 comment
Labels
Milestone

Comments

@dracorpg
Copy link
Contributor

dracorpg commented Apr 19, 2021

PTree 2.0 process terminates within one second upon closing the "Item edition" window by pressing the return/enter key when the cursor is in a field. This is, of course, extremely frustrating when trying to quickly adjust the value of a property :)
Changes made in the "Item edition" window are applied and can be seen reflected in the main window in the split second before the app crashes.

To Reproduce

  1. Open an existing PTree file (e.g. example.ptree) or create a new one and add at least a source to have something to edit
  2. Double-click an item (source / regulator / load) to open its edition window
  3. Click in any property field (changing its value is optional)
  4. Press the return key
  5. If the app doesn't crash almost instantly, repeat steps 2-4 a few times (I couldn't pinpoint what makes it crash vs. not crash, but it does happen a lot)

Expected behavior
No crash, of course!

Desktop (please complete the following information):

  • OS: Windows (also confirmed on Fedora)
  • Version: 2.0 (regression from 1.8)
@smariel
Copy link
Owner

smariel commented Apr 19, 2021

Can't reproduce on macOS.
Also happens with ESCAPE.
Only happens with the keyboard, not the buttons.

It may be the default behavior of using keys to validate/cancel a form with the new version of Chromium (on Windows and Linux), interfering with the app process.
To be tested : add event.preventDefault() after triggering ENTER and ESCAPE in the event callback.

$(document).keydown((event) => {

@smariel smariel added the bug label Apr 19, 2021
@smariel smariel added this to the v2.0.1 milestone Apr 19, 2021
@smariel smariel closed this as completed May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants