Javascript 导致事件传播的转盘内可编辑的内容

Javascript 导致事件传播的转盘内可编辑的内容,javascript,jquery,html,Javascript,Jquery,Html,我正在使用下面的行动态创建一个可编辑的div <div class='reflection-field' contenteditable="true" data-number="${index}"></div> 还有这个 $(".owl-carousel").on("click",".reflection-field", function( event ) { event.stopPropagation(); propStopped( event ) });

我正在使用下面的行动态创建一个可编辑的div

<div class='reflection-field' contenteditable="true" data-number="${index}"></div>
还有这个

$(".owl-carousel").on("click",".reflection-field", function( event ) {
   event.stopPropagation();
   propStopped( event )
});

function propStopped( event ) {
 if ( event.isPropagationStopped() ) {
   console.log("called");
 } else {
console.log("not called");
 }
}
//called
但是,这并没有发生。我会非常感谢你的帮助

jsFIDLE:

好的,这是交易

“鼠标下移”让人想起猫头鹰转盘2中的抓取

所以这就成功了

$(".reflection-field").on("click tap mousedown", function( event ) {
   event.stopPropagation();
});  
好的,就这么定了

“鼠标下移”让人想起猫头鹰转盘2中的抓取

所以这就成功了

$(".reflection-field").on("click tap mousedown", function( event ) {
   event.stopPropagation();
});  

我们可以在运行时有意地启用或禁用可拖动特性。以下代码适用于Owl转盘和其他类似问题:

$(".reflection-field").draggable()
      .click(function() {
        $(this).draggable({ disabled: false });
    }).dblclick(function() {
        $(this).draggable({ disabled: true });
    });
不要忘记添加jQueryUI库以使其正常工作。

我们可以在运行时有意启用或禁用可拖动功能。以下代码适用于Owl转盘和其他类似问题:

$(".reflection-field").draggable()
      .click(function() {
        $(this).draggable({ disabled: false });
    }).dblclick(function() {
        $(this).draggable({ disabled: true });
    });
不要忘记添加jQueryUI库以使其正常工作。 ​