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

[4.0.0+] Enter invalid date with `allowInvalid: false` breaks table #5419

Closed
aaronbeall opened this Issue Sep 27, 2018 · 2 comments

Comments

@aaronbeall
Contributor

aaronbeall commented Sep 27, 2018

Description

If you have a table with allowInvalid: false and you try to enter an invalid date into a date cell you get stuck in the cell without any way to get out: pressing Escape does not revert to the original value, focus remains locked in the cell, and even entering a valid date and pressing Enter doesn't close the cell editor.

Steps to reproduce

  1. Take the date demo and add allowInvalid: true -- example here
  2. Enter an invalid date into the date column, like "abc", press Enter
  3. The cell keeps focus in editor and clears the value, press Escape or enter a valid date and press Enter

Result: nothing happens, the cell is stuck in edit and will not give up focus:

  • Escape does not revert to original value.
  • Clicking outside the cell keeps focus in edit.
  • Entering a valid date and pressing Enter is not accepted.

Edit: I noticed that you can get out of the cell editor by entering a valid value and clicking another cell (pressing Enter at that point doesn't work, but clicking outside the cell does).

Demo

https://jsfiddle.net/9k172y56/

Your environment

  • Handsontable version: 4.0.0 Pro
  • Browser Name and version: Chrome 69
  • Operating System: MacOS High Sierra
@AMBudnik

This comment has been minimized.

Contributor

AMBudnik commented Oct 1, 2018

Thank you for sharing the bug and the scenario. The .gif tells us everything.
I have replicated it in the newest version. Thanks for checking the last version that worked. You've mentioned the 4.0.0 was the first one to break the functionality.

@AMBudnik AMBudnik changed the title from Enter invalid date with `allowInvalid: false` breaks table to [4.0.0+] Enter invalid date with `allowInvalid: false` breaks table Oct 1, 2018

@wojciechczerniak wojciechczerniak added this to the November 2018 milestone Oct 15, 2018

@pnowak pnowak self-assigned this Oct 16, 2018

pnowak added a commit that referenced this issue Oct 17, 2018

pnowak added a commit that referenced this issue Oct 17, 2018

pnowak added a commit that referenced this issue Nov 5, 2018

Remove flag from dateEditor, because it falsely points to closing the…
… editor when it's open. (#5520)

* isEditorOpened in copyPaste plugin must return true when editor is open #5419
@AMBudnik

This comment has been minimized.

Contributor

AMBudnik commented Nov 14, 2018

Thanks again @aaronbeall
Released in 6.2.0

@AMBudnik AMBudnik closed this Nov 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment