Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not responding after 1 time clicking
This topic contains 8 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 5 months ago.
- AuthorPosts
- October 24, 2016 at 3:28 pm #10582
Hi there,
The search plugin is not responding to 1 click. For example, if I click on a search suggestion the search tool is not responding, only after two clicks.
Issue appears on: the mobile phone (Iphone 5C) and Windows (Chrome).
I would like to avoid 2 clicks. It should show results after 1 click.I need to know the ip address of the staff so I can whitelist it.
Best regards,
Cenk
October 25, 2016 at 8:54 am #10593Hi!
Do you mean the suggested phrases? (under the search bar: https://i.imgur.com/ZZ5pYyM.png)
If so, I’m not sure, it’s probably a 3rd party script conflicting, but I will have to see the issue first.My current IP is: 159.253.107.90
Best,
It’s not a static IP and changes often, so let me know if you need some other information as well.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 25, 2016 at 11:15 am #10594Hi Ernest,
I have whitelisted the ip address. It’s the search suggestion link table..causes the user to double click a link instead of 1 click. Please see attached file.
Attachments:
You must be logged in to view attached files.October 25, 2016 at 11:43 am #10596You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 25, 2016 at 12:04 pm #10597Hi Ernest,
Thank you for the quick response. I have turned the keyboard behaviour off. Same results.
I have tested it on the touchscreen Windows computer, maybe that’s reason why it didn’t work.
How can I solve the mobile issue? An average user will not know about the double clicking behaviour when they are using a mobile device.
Thank you,
Cenk
October 25, 2016 at 12:20 pm #10598Hi!
Unfortunately this is hard-coded, but I have a possible solution for you, without actually touching the plugin code.
Try putting this code snippet into the functions.php file in your active theme directory:
Make sure to have a back-up of everything first, in case something goes wrong.
This code basically catches the click/touch event a prevents the default handling and continues to the page where it is supposed to go. I think I will re-evaluate this behavior for the upcoming release, it really seems unpleasant – I think I rather add an option to enable it in case, but disable it by default.
I hope this helps you!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 25, 2016 at 12:51 pm #10599Thank you! Which part needs to be in the function.php?
This one?
———————————
add_action( ‘wp_footer’, ‘asp_prevent_double_tap’ );
function asp_prevent_double_tap() {
?>
<script>
jQuery(function($){
$(‘.results’).on(‘click touchend’, ‘.item’, function(e){
e.preventDefault();
e.stopImmediatePropagation();
e.stopPropagation();
window.location.href = $(‘a.asp_res_url’, this).attr(‘href’);
});
});
</script>
<?phpOctober 25, 2016 at 1:26 pm #10600Awesome! It works now. Thank you very much!
October 26, 2016 at 8:14 am #10606You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Not responding after 1 time clicking’ is closed to new replies.