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

Using enter to edit content leads to trimmed form input #1105

Closed
kalkoen opened this issue Aug 25, 2021 · 3 comments
Closed

Using enter to edit content leads to trimmed form input #1105

kalkoen opened this issue Aug 25, 2021 · 3 comments

Comments

@kalkoen
Copy link

kalkoen commented Aug 25, 2021

Description

When attempting to change the value of a form field, by entering the value and then pressing Enter on the keyboard, the form value is not always (fully) updated.

Steps to reproduce

Run
php artisan twill:module events
php artisan migrate

Add

   "events" => [
        "title" => "Events",
        "module" => true
    ]`

to twill-navigation.php

Add Route::module('events'); to routes/admin.php

Go to admin console, to Events
Create an Event named "Whatever" using buttons (similar problem with the title field in the modal, but I am not focusing on that now)
Change description to "Description", press Enter.
Description should now be "Description"
Change description to "UpdatedDescription", press Enter.

Expected result

I expect the event to update with "UpdatedDescription" as description.

Actual result

The actual value of description is a trimmed version of "UpdatedDescription", i.e. "UpdatedDescrip". Exact value seems to vary each try. It seems to happen when you press enter quickly after finishing typing. It seems as if there is a timer running in the background that only "truly" registers form field changes once every x seconds. Press enter before? Your last characters are not registered.

Versions

Twill version: 2.4.0
Laravel version: 8.56.0
PHP version: 7.4.19
Database engine: MySQL

@kalkoen kalkoen changed the title Using enter to traverse content management leads to trimmed form input Using enter to edit content leads to trimmed form input Aug 25, 2021
@pboivin
Copy link
Contributor

pboivin commented Aug 25, 2021

Hi @kalkoen, I can confirm this issue. Thanks for reporting!

It is being addressed by #1030 which has been finalized a few days ago.

@kalkoen
Copy link
Author

kalkoen commented Aug 25, 2021

Thanks for the quick reply! Great to see a fix is on its way!

@pboivin
Copy link
Contributor

pboivin commented Sep 1, 2021

Merged into 2.x 8331989

@pboivin pboivin closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants