Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Not responding after 1 time clicking
- This topic has 8 replies, 2 voices, and was last updated 9 years, 7 months ago by
Ernest Marcinko.
-
AuthorPosts
-
October 24, 2016 at 3:28 pm #10582
Cenk Arslan
ParticipantHi 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 #10593Ernest Marcinko
KeymasterHi!
Do you mean the suggested phrases? (under the search bar: http://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
It’s not a static IP and changes often, so let me know if you need some other information as well.October 25, 2016 at 11:15 am #10594Cenk Arslan
ParticipantHi 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.
October 25, 2016 at 11:43 am #10596Ernest Marcinko
KeymasterYou cannot access this content.
October 25, 2016 at 12:04 pm #10597Cenk Arslan
ParticipantHi 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 #10598Ernest Marcinko
KeymasterHi!
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!
October 25, 2016 at 12:51 pm #10599Cenk Arslan
ParticipantThank 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 #10600Cenk Arslan
ParticipantAwesome! It works now. Thank you very much!
October 26, 2016 at 8:14 am #10606Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- The topic ‘Not responding after 1 time clicking’ is closed to new replies.