Last Updated: 02 Feb 2021 17:54 by ADMIN
Zhi Yuan
Created on: 02 Feb 2021 12:00
Category: DateTimePicker
Type: Feature Request
Prevent the soft keyboard from showing after the popup closes on Android

Based on the example https://demos.telerik.com/blazor-ui/datetimepicker/overview, on Cancel or Set, the Input gets focused. On the mobile, it causes the keyboard to appear as well, which is not an intuitive behaviour.

Is it possible for this behaviour to be removed?



This behavior is OS specific, in our tests iOS does not exhibit it. It is generally up to the OS to show the soft keyboard and the web app should not be able to alter that.

Also, generally speaking from an accessibility point of view, popups must have a default focus (we do that), and when they close, they must return the user to the flow of the application in the place where they took it from. In this case, that's an interaction with the picker component.

Nevertheless, if the focus went to the button rather than the input, it is highly likely that the behavior would be resolved. The only downside would be that Android users will need a second action to get the focus back in the input.


Marin Bratanov
Posted on: 02 Feb 2021 17:54


The two issues are separate enhancement ideas. This one is about choosing which element to be focused after the popup hides (it is the <input> at the moment, and perhaps focusing the <button> will address it. The other one you found is about the reverse action - what should open the popup. At the moment that is an explicit click/tap on the calendar button, and that other enhancement is about showing the popup when the <input> is focused (the user taps/clicks on it, or uses Tab to get to it). So, they are independent and implementing one will not have a bearing on the other.


Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Zhi Yuan
Posted on: 02 Feb 2021 13:50

Hi Marin,

Thanks for your prompt response on the forum question https://www.telerik.com/forums/input-gets-focused-on-cancel-or-set! I'm thinking if it's possible for this issue to be resolved sooner than later, because it does cause some inconvenience for Android users and I'm unable to find a good enough workaround. It's also preferable that both iOS users & Android users experience the same behavior when selecting DateTime.

Also, I think that the downside of Android users requiring a second action to get the focus back in the input might not be a real problem, because if a user is already opening the DateTimePicker to select the Date & Time, then it's probably less likely that the user will want to use the keyboard to make subsequent modifications.

On a side note, I think this issue is somewhat related to this other issue as well: https://feedback.telerik.com/blazor/1475760-dropdowns-and-date-time-pickers-open-the-dropdown-on-component-focus. If the dropdown opens on component focus (which probably implies that user interaction does not cause input to be focused), I would suppose that the component (rather than input) gets focused on Cancel or Set as well.

So, it seems that this issue would be resolved if that issue is resolved.