Javascript 在safari中拖动时数据工具提示不起作用
拖动此元素时:Javascript 在safari中拖动时数据工具提示不起作用,javascript,Javascript,拖动此元素时: 在该元素上: 尽管光标按预期更改为手动光标,但数据工具提示不会显示。在safari中不拖动时,它可以正常工作。在firefox、chrome和edge中拖动时效果良好 我试过: aElement.addEventListener("mousedown", mouseDown(event), false); function mouseDown(event){ event.preventDefault(); } 出于某种奇怪的原因,在mac键盘上按下命令、选项
在该元素上:
尽管光标按预期更改为手动光标,但数据工具提示不会显示。在safari中不拖动时,它可以正常工作。在firefox、chrome和edge中拖动时效果良好
我试过:
aElement.addEventListener("mousedown", mouseDown(event), false);
function mouseDown(event){
event.preventDefault();
}
出于某种奇怪的原因,在mac键盘上按下命令、选项、控件或fn键后,safari中的数据工具提示就会起作用
function dragStart(event) {
draggedElement.style.position = "fixed";
draggedElement.style.zIndex = "1";
if(!is_safari){
event.preventDefault();
}else{
event.preventDefault();
therapistDiv.addEventListener("mousedown", mouseDown(event), false);
}
iDiv.setAttribute("style","height:"+therapistDiv.clientHeight+"px;");
var rect = therapistDiv.getBoundingClientRect();
offset = [
therapistDiv.offsetLeft - rect.left,
therapistDiv.offsetTop - rect.top
];
isDown = true;
}
document.addEventListener('mouseup', function(event) {
if(isDown){
dropBooking(element);
isDown = false;
}
}, true);
function dropBooking(div) {
form.submit();
}
chrome数据工具提示
拖动时工作正常。但是当拖动鼠标并按下鼠标时,小工具提示“15:30”不会在safari中显示。它仅在按下shift、fn、control、option或command后工作。