jquery - 第一次在引导模式中拖放位置问题,用于 ui 可排序
问题描述
我面临第一次执行的事件的拖放问题。当我第一次将图像拖放到另一个地方时,该问题与图像的位置有关。
这是代码:
$(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小提琴链接。 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');
});
推荐阅读
- ceph - 许多 rbd_data 文件未链接到任何 ceph 映像
- android - geolocator 6.0.0+1 distanceBetween() 无法正常工作
- sql - 如何在 oracle 11g 中获取分层连接数据的根
- java - Java 中 BigDecimal 数字的错误计算
- spring-cloud-stream - 无法从应用程序 yml 为 Spring 云流应用程序创建优先级队列
- java - 在 spring 中使用 Quartz 执行 Job 时出错
- python - 数据框、烧瓶和 wtf
- python - 在 Django 中使用查询的问题
- kubernetes - 在 Kubernetes 中运行 presto CLI 的问题
- unity3d - 在 Unity 中隐藏部分游戏对象