ui icon indicating copy to clipboard operation
ui copied to clipboard

Form submit on Enter key press not working, if only one input field in form

Open mkrecek234 opened this issue 3 years ago • 3 comments

A Form with only one input field won't submit on enter key press. It will if there are two input fields or more...

Code to replicate:

$form = \Atk4\Ui\Form::addTo($app);
$form->addControl('id');
// If you uncomment the next line, it will work
//$form->addControl('id2');

Console warning on atkjs-ui-min.js 1:1102

mkrecek234 avatar May 11 '22 13:05 mkrecek234

can be reproduced on demos/form/form.php demo (1st form has one field)

currently, the submit even is triggered twice somehow:

image

mvorisek avatar May 11 '22 16:05 mvorisek

can be also reproduced on /demos/interactive/modal.php demo

click Multi Step Modal and then (when input in modal is focused) press Enter key, reload flashes very quickly, but nothing happen

when submit thru Save, the following is shown:

image

I would expect the same result after Enter key is pressed

mvorisek avatar Aug 20 '22 21:08 mvorisek

hi i want to work on it please let me know if i can contribute to it ?

AdityaMathur25 avatar Sep 24 '22 15:09 AdityaMathur25

PR is welcomed

mvorisek avatar Sep 24 '22 16:09 mvorisek

can you assing me this

AdityaMathur25 avatar Sep 25 '22 07:09 AdityaMathur25

fixed in Fomantic-UI 2.9.0 (merged into develop already)

mvorisek avatar Oct 10 '22 12:10 mvorisek