Skip Navigation

[Resolved] Impossible to launch search on mobile

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 20 replies, has 2 voices.

Last updated by romanB-3 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1693339

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I completed the migration of the website and the issue is not reproduced on our server, you can check it here hidden link

I am not sure what on your server is causing this 307 response code. Please check with your hosting provider if he can provide help so we can understand what is the cause of this issue.

#1706449

I've just tested you duplicated site and have the eaxct same issue.
When I enter textr in the "Recherche" textbox, the auto search doesn't launch, and the only available button in virtual keyboard is "NEXT" so I can't launch the search.
Thank you.

#1707707

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and my apologies for the late reply. I can reproduce the same issue on my mobile and my colleague confirms that too.

It turns out that the search input expects an "Enter" clicked to trigger the search. The "NEXT" button does not seem to trigger the search. So, I come up with this custom Javascript code that will wait 3 seconds after the last keyboard input and then simulate an "Enter" key.

jQuery(function($){
	var seconds_to_wait = 3;
	var mytimeout = null;
	$( document).on( 'keydown', '.js-wpv-ajax-results-enabled .js-wpv-filter-trigger-delayed, .js-wpv-ajax-results-submit-enabled .js-wpv-filter-trigger-delayed', function(e){
		clearTimeout(mytimeout);
		
		if ( e.which == 13 ) {
			return;
		}
		
		var input = jQuery(this);
		mytimeout = setTimeout(function(){
			var ev = jQuery.Event("keypress");
			ev.which = 13; // # Some key code value
			ev.keyCode = 13;
			input.trigger(ev);
		}, seconds_to_wait * 1000)
	});
})

I tested it on the test server on my mobile phone and it seems to work. Would you like to test it from your side and then implement it on your server and confirm if it is working.

#1707973

In deed this works great; thank you.
Would it be possible to force explorers to detect the search field as an input field and therefore allow the "SEARCH" button instead of the "NEXT" one ?
Thank you.

#1708571

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

From what I was able to find online so far, I think that there is no way to force the mobile virtual keyboard to use a "Search" button instead of the "Next". Mobile keyboards will always show the "Next" button until we get to the last input on the form.
So, if you put the search input field at the end of the form, instead of the beginning, it will not show "Next".
This has nothing to do with Toolset or WordPress, it is a decision made by the mobile system(Android, iOS).

#1708765

My issue is then resolved now. Thank you very much!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.