Did anyone know how to set focus to alert?
depending on which element should get the focus, e.g.:
dialog.$el.find('input').focus();
this.$f7.dialog.alert(“Hello”,“My name is tom”));
is it using dialog.$el.find(‘input’).focus(); to get the focus?
By default it doesn’t use it because there is no inputs in alert
this.$f7.dialog.alert(“Hello”,“My name is tom”));
How can I set focus for alert?
Why do you need to focus on alert? What do you mean “How can I set focus for alert?” ? The above method does not generate any elements of input.
<div class="dialog dialog-buttons-1 modal-in" style="display: block;">
<div class="dialog-inner">
<div class="dialog-title">My name is Tom</div>
<div class="dialog-text">Hello</div>
</div>
<div class="dialog-buttons">
<span class="dialog-button dialog-button-bold">Да</span>
</div>
</div>
1 Like