我在第一次执行事件时遇到拖放问题。该问题与我第一次将图像拖放到另一个位置时的位置有关。
这是代码:
$(document).on("click", ".make_pdf", function(){
var url = $(this).attr('url');
$('.modal-body').html('Loading...');
$('.modal-body').load(url,function(result){
$('#make-pdf').modal({show:true});
$( this ).children('.user-settings').children('.pdf-list').children('#sortable').sortable();
$( this ).children('.user-settings').children('.pdf-list').children('#sortable').disableSelection();
});
});
了解更多信息。这种拖放可以在没有模式的情况下正常工作,所以请问有人可以帮助使用引导模式解决这个问题吗?
这里是 js fiddle 链接。 https://jsfiddle.net/zrLv0ogj/11/ 请增加jsfiddle中输出窗口的高度和宽度。
Jsfiddle 图片链接。 http://prntscr.com/kp1axw
最佳答案
这对我有用。
$(document)
.on('mouseup', function() {
$('.modal').css('overflow', '');
})
.on('mousedown', '.ui-sortable-handle', function() {
$('.modal').css('overflow', 'hidden');
});
关于jquery - 首次在引导模式中拖放位置问题以进行 ui 可排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52109729/