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

Problem when press enter key in "Create Dialog Form" #254

Closed
MrMichetti opened this issue Feb 16, 2013 · 6 comments
Closed

Problem when press enter key in "Create Dialog Form" #254

MrMichetti opened this issue Feb 16, 2013 · 6 comments
Assignees
Labels
Milestone

Comments

@MrMichetti
Copy link

Hi,
I have a problem when i press Enter Key to send the request in Create Dialog form.
If i press the button with mouse all work ok, but if i press enter the ajax call doesn't work and jtable redirect to the ajax url request.
Someone have the same problem and help me?

Now i had disabled the enter key in the form with js :(

@hikalkan
Copy link
Member

For me, it does nothing (see samples on jtable.org). But there are some people have this problem. I'll check and fix it (I'll assume enter as submit). Thanks for your feedback.

@MrMichetti
Copy link
Author

I use jtable with codeigniter.. I don't Know are important to Your check.. Anyway.. Tkx

@MrMichetti MrMichetti reopened this Feb 16, 2013
@ghost ghost assigned hikalkan Mar 10, 2013
@hikalkan
Copy link
Member

Will be released with 2.3.1

@mablerf
Copy link

mablerf commented May 14, 2013

Until this is addressed in the release, this works...

$('body').on('keypress', 'form#jtable-edit-form input', function(e){
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) {
$('button#EditDialogSaveButton').trigger('click');
}
});

@mizalewski
Copy link

@MrMichetti you can simply disable submit on form, please look at my commit:
https://github.com/drucik86/jtable/commit/7722e4d17946c8ef7b65c39cd01eaf3bb22b0713
@hikalkan Problem occur only when jtable has one field in form.

hikalkan added a commit that referenced this issue Sep 21, 2013
Bugfixes (#161, #254, #357, #570, #822) and localizations.
@nonozor
Copy link

nonozor commented Feb 25, 2015

Great thanks michalzalewski : you've saved my day !

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

5 participants