Forums › Forums › Search & Filter Pro › Event – on ajax updated
Tagged: search input enter
- This topic has 3 replies, 2 voices, and was last updated 10 years, 6 months ago by
Ross.
-
Anonymous(Private) April 6, 2016 at 7:41 pm #41815
Hi I would like to ask you if there is any even, which I can use it to check if ajax update of result was fired.
I need for search input, to prevent enter – because this reset search and behave as cancel – visitors claim it.
I can prevent for keypress, but after ajax update it is reseted again and you can press enter – which reset whole filter.…may be that could be included as option for search input.
Ross Moderator(Private) April 6, 2016 at 10:19 pm #41858Hey Peter
What is the issue exactly? Do you see the problem on our online demo?
http://demo.designsandcode.com/sfpro-movie-reviews/search/
RE the event – yup there is one, details can be found – http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/ 🙂
Thanks
Anonymous(Private) April 6, 2016 at 10:41 pm #41861Hi, no there is not that issue.
I will try to describe simply:
– form is ajax
– I use search (relevansi)
– when you are inside search input (focus) and push enter – it reload page and reset whole filter…I fix it by jQuery for a moment:
$('body').on('keypress', '.sf-field-search .sf-input-text', function (e) { if (e.which == 13) return false; //or... if (e.which == 13) e.preventDefault(); });…I try to check documentation instead of FAQ, thank you 🙂
Ross Moderator(Private) April 20, 2016 at 1:01 am #43323Hey Peter
I had a user with a similar problem recently, and we found out it was because he was loading an old / duplicate copy of jquery in his site, so there were two jquery scripts loaded in.
This was causing the field to go blank exactly as you describe.
There was also another bug with the search field (which you couldn’t see on your site because of this issue before), where if you press enter, the search form submits, but then immediately after it is autosubmitted again.
This is fixed in the next version.
Thanks
-
AuthorPosts