lectora中拖拽题在iapd上的适配
? ? ? 首先要说明的是,在ipad上的事件,touchevent 会在 mouseevent之前执行
所以要用touchstart、touchmove、touchend分别代替mousedown、mousemove、mouseup
?
? ? ? ?在lectora中的拖拽题,在pc的浏览器中正常,但是在ipad上无法正常显示。
?
? ? ? ?拖拽相关的js文件是trivantis-drag.js,导致ipad无法使用的原因有二:
? ? ? ?其一是在initDragMouseEvents函数中没有监听touchevent;
? ? ? ?其二是在dragMouseDown函数中判断了event 的which值,其值为0,1,2分别代表鼠标的左中右三个键。
?
? ? ? ?修改并注释掉相关代码后,可以正常显示了。
?
? ? ? ?将附件中js替换原始js,或者新建“外部文件”以替换。
?
? ? ? ?结果在ipad上safari测试通过。