Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ipad jQuery UI sortable中的文本输入不';不要在触摸设备上工作_Ipad_Jquery Ui_Input_Touch_Jquery Ui Sortable - Fatal编程技术网

Ipad jQuery UI sortable中的文本输入不';不要在触摸设备上工作

Ipad jQuery UI sortable中的文本输入不';不要在触摸设备上工作,ipad,jquery-ui,input,touch,jquery-ui-sortable,Ipad,Jquery Ui,Input,Touch,Jquery Ui Sortable,我制作了一个简单的页面,其中一些div可以通过jQueryUISortable进行排序,并得到了一些帮助,使其能够在运行iOS 7.1.2的iPad上运行 在每个div中,我都包含了一个文本输入标记。在桌面浏览器上,输入工作正常,但iPad无法识别点击输入组件。键盘没有启动,我无法输入。有灯光吗 我的页面在这里:好吧,这是对我有用的东西 我编辑了jquery.js。在jQuery.Event.prototype上,在preventDefault函数中,有: if ( e.preventDefau

我制作了一个简单的页面,其中一些div可以通过jQueryUISortable进行排序,并得到了一些帮助,使其能够在运行iOS 7.1.2的iPad上运行

在每个div中,我都包含了一个文本输入标记。在桌面浏览器上,输入工作正常,但iPad无法识别点击输入组件。键盘没有启动,我无法输入。有灯光吗


我的页面在这里:

好吧,这是对我有用的东西

我编辑了jquery.js。在
jQuery.Event.prototype
上,在
preventDefault
函数中,有:

if ( e.preventDefault ) {
    e.preventDefault();
} else {
    e.returnValue = false;
}

基本上,我将if条件更改为
e.preventDefault&&e.target.tagName!=“输入”
。它解决了这个例子,但在现实生活中,我需要添加更多的条件,以确保其他输入字段不会被它捕获。

好吧,下面是对我有效的方法

我编辑了jquery.js。在
jQuery.Event.prototype
上,在
preventDefault
函数中,有:

if ( e.preventDefault ) {
    e.preventDefault();
} else {
    e.returnValue = false;
}

基本上,我将if条件更改为
e.preventDefault&&e.target.tagName!=“输入”
。它解决了这个例子,但在现实生活中,我需要添加更多的条件,以确保其他输入字段不会被它捕获。

好吧,下面是对我有效的方法

我编辑了jquery.js。在
jQuery.Event.prototype
上,在
preventDefault
函数中,有:

if ( e.preventDefault ) {
    e.preventDefault();
} else {
    e.returnValue = false;
}

基本上,我将if条件更改为
e.preventDefault&&e.target.tagName!=“输入”
。它解决了这个例子,但在现实生活中,我需要添加更多的条件,以确保其他输入字段不会被它捕获。

好吧,下面是对我有效的方法

我编辑了jquery.js。在
jQuery.Event.prototype
上,在
preventDefault
函数中,有:

if ( e.preventDefault ) {
    e.preventDefault();
} else {
    e.returnValue = false;
}
基本上,我将if条件更改为
e.preventDefault&&e.target.tagName!=“输入”
。它解决了这个例子,但在现实生活中,我需要添加更多的条件,以确保其他输入字段不会被它捕获。

jquery.ui.touch punch.js中的更改对我有效。 JS:jquery.ui.touch-punch.JS 要修改的方法:

//line: 31    
function simulateMouseEvent(event, simulatedType) {
 //...
}


//changes to add ++
if ($(event.target).is("input") || $(event.target).is("textarea")) {
    return;
} else {
    event.preventDefault();
}
jquery.ui.touch-punch.js中的变化对我来说很有用。 JS:jquery.ui.touch-punch.JS 要修改的方法:

//line: 31    
function simulateMouseEvent(event, simulatedType) {
 //...
}


//changes to add ++
if ($(event.target).is("input") || $(event.target).is("textarea")) {
    return;
} else {
    event.preventDefault();
}
jquery.ui.touch-punch.js中的变化对我来说很有用。 JS:jquery.ui.touch-punch.JS 要修改的方法:

//line: 31    
function simulateMouseEvent(event, simulatedType) {
 //...
}


//changes to add ++
if ($(event.target).is("input") || $(event.target).is("textarea")) {
    return;
} else {
    event.preventDefault();
}
jquery.ui.touch-punch.js中的变化对我来说很有用。 JS:jquery.ui.touch-punch.JS 要修改的方法:

//line: 31    
function simulateMouseEvent(event, simulatedType) {
 //...
}


//changes to add ++
if ($(event.target).is("input") || $(event.target).is("textarea")) {
    return;
} else {
    event.preventDefault();
}

我知道这是一个老生常谈的问题,但在不修改JS文件的情况下,以下内容对我有效:

let detectTap = false;

$('body').on('touchstart', '#sortableMenu input', () => {
  detectTap = true;
});
$('body').on('touchmove', '#sortableMenu input', () => {
  detectTap = false;
});
$('body').on('touchend', '#sortableMenu input', (e) => {
  if (detectTap) $(e.target).focus();
});

基本上只是在输入上添加一个点击侦听器,当它得到点击时,关注该输入。

我知道这是一个老问题,但在不修改JS文件的情况下,以下内容对我有用:

let detectTap = false;

$('body').on('touchstart', '#sortableMenu input', () => {
  detectTap = true;
});
$('body').on('touchmove', '#sortableMenu input', () => {
  detectTap = false;
});
$('body').on('touchend', '#sortableMenu input', (e) => {
  if (detectTap) $(e.target).focus();
});

基本上只是在输入上添加一个点击侦听器,当它得到点击时,关注该输入。

我知道这是一个老问题,但在不修改JS文件的情况下,以下内容对我有用:

let detectTap = false;

$('body').on('touchstart', '#sortableMenu input', () => {
  detectTap = true;
});
$('body').on('touchmove', '#sortableMenu input', () => {
  detectTap = false;
});
$('body').on('touchend', '#sortableMenu input', (e) => {
  if (detectTap) $(e.target).focus();
});

基本上只是在输入上添加一个点击侦听器,当它得到点击时,关注该输入。

我知道这是一个老问题,但在不修改JS文件的情况下,以下内容对我有用:

let detectTap = false;

$('body').on('touchstart', '#sortableMenu input', () => {
  detectTap = true;
});
$('body').on('touchmove', '#sortableMenu input', () => {
  detectTap = false;
});
$('body').on('touchend', '#sortableMenu input', (e) => {
  if (detectTap) $(e.target).focus();
});
基本上,只需在输入端添加一个点击侦听器,当它得到点击时,关注该输入