How not to Allow Cursor go into Input Automatically?
I have form
with input
's. When it's opened (via jQuery UI: Dialog)... cursor (that think that blinks after your text as you type) automatically jumps into first 开发者_开发问答input
! It ruins my placeholder
's text and I'm looking for way to disallow cursor automatically focus on input
or set another input
as default one for focusing-in.
The offending code is in the open()
function of the UI dialog:
$(self.element.find(':tabbable').get().concat(
uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
uiDialog.get()))).eq(0).focus();
It automatically gives focus to the first tabbable element in the dialog. You can make your input untabbable by setting the property tabindex="-1"
on the <input>
.
Hope that helps
精彩评论