Input loses focus when keyboard opens in iOS Browsers - javascript

Any input that I tap inside of my Swiper-Slide on the page lose focus when they keyboard opens (in Chrome and Safari). Once the keyboard is open, I can click the input and then start typing. I'm not exactly sure what's causing the problem because inputs outside of the slider work like normal.
I have an onFocus function being called by the input that doesn't fire the first time it's clicked even though the keyboard pops up. Is there some Javascript or Jquery way to force the browser to focus an input that works in iOS browsers?

Related

When i use VoiceOver of Mac to navigate through the website, focus is remaining at a button and its being there until another button is encountered

When I use VoiceOver of Mac to navigate the website using the keyboard command (cmd+shift+left/right arrows), the focus remains on a button. It is there until another button is encountered. The issue is only in Chrome and Microsoft Edge browsers. The above-mentioned scenario is working well for Safari and Firefox browsers. When a button gets the focus and VoiceOver moves to other text elements, due to the focus of the button, the voiceover is again navigating back to the focused button and iterating through the elements that are already read.
I tried "focusin","focusout" event listeners to set aria-hidden / tabIndex values accordingly. I also tried setting the focus of elements using CSS, making box-shadow:none, outline:none, but that just makes the focus not visible.

How to open keyboard on focus() event of textbox in mobile chrome browser

Trying to focus on a simple input text when the page loads with jQuery events, my target is to focus and open the keyboard on mobile browsers but it's not working.
My code looks so simple as:
$('#txtNumber').focus();
$('#txtNumber').trigger('click');
I'm not sure what I am missing here to open the keyboard on the browser when focusing on the text input box.

mobile keyboard popping when slidetoggle is used

I am working on a mobile webpage. I have one element, that has a text field, that I call jQuery slideToggle on, so it can be hidden from view when the user wishes to dismiss it.
It works fine on browser, even on simulating a device, and in an actual device. The problem is that when the button to dismiss it is clicked on an iPhone, the keyboard pops up.
I already checked if the is the text field is being focused, but seems not to be the case.
What might be the reason for this behavior?

How to handle differences in iOS and Android Keyboard

For HTML/JS in mobile browsers, I'm having an issue where blur events trigger differently in iOS and Android. In iOS, a user can click on "Done" on the native keyboard, which hides the keyboard and causes the focused element to blur.
The same, however, does not happen when a user clicks the back icon in Android to hide the native keyboard; The elements that were previously focused keep their focus.
Is there a way to listen for the keyboard hiding and trigger a blur on the focused element? Or is there a way to force the Android keyboard to display a "done" button? Or is there a generally better solution?
Maybe a solution would be to listen to the keydown event on the input, and check if the keypress is "Enter".
To do that, please refer to this :
Enter key press event in JavaScript

Javascript / jQuery Windows 8 On-Screen Keyboard

I'm trying to build an application where if the user activates a page, a focus event will occur and focus into a text field. I was half-heartedly expecting that when I called .focus() on in the input box, Windows 8 would pop-up the on-screen keyboard. This in not the case.
Does anyone know of a way to get the Windows 8 on-screen keyboard to come up when the text field is focused via javascript.
If the user "taps" into the textfield, the focus event does fire and the keyboard comes up.
I've tried binding to touchstart, 'touchend, click and focus, but all of these do not seem to activate the on-screen keyboard.
This application will run strictly on Windows 8, so there is no need to make it so that other platforms that do not have built-in on-screen keyboards work properly.
You can't. Only user actions can open the on-screen keyboard. This is by design. See here.

Categories