无法在ui对话框中删除自动对焦 [英] Unable to remove Autofocus in ui-dialog

查看:93
本文介绍了无法在ui对话框中删除自动对焦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的jQuery用户界面对话框的第一个元素是一个输入,其被选择时打开一个datepicker ...

The first element in my jQuery UI Dialog is an input, which when selected opens a datepicker...

如何禁止首先选择此输入?

How can I disable this input from being selected first?

推荐答案

在调用对话框之前添加以下代码.这将清除自动对焦代码.它在jquery 2.0.3.中对我有效.

Add the following code before you call dialog. This will clear out the autofocus code. It works for me in jquery 2.0.3.

$.ui.dialog.prototype._focusTabbable = function(){};

这篇关于无法在ui对话框中删除自动对焦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆