gpt4 book ai didi

javascript - Impress.js + 火狐浏览器 : How to disable advance slide on mouse click

转载 作者:行者123 更新时间:2023-12-02 14:51:09 25 4
gpt4 key购买 nike

Impress.js 在 Chrome 中运行良好,但不幸的是,它在 Firefox 中存在一些问题。我遇到的最大问题是,在 Firefox 中,每次单击鼠标时幻灯片都会前进到下一张幻灯片。有人知道禁用此功能的方法吗?

最佳答案

进入js/impress.js,删除下面的代码(大约第783~797行),监听点击事件:

    // Delegated handler for clicking on step elements
document.addEventListener( "click", function( event ) {
var target = event.target;

// Find closest step element that is not active
while ( !( target.classList.contains( "step" ) &&
!target.classList.contains( "active" ) ) &&
( target !== document.documentElement ) ) {
target = target.parentNode;
}

if ( api.goto( target ) ) {
event.preventDefault();
}
}, false );

关于javascript - Impress.js + 火狐浏览器 : How to disable advance slide on mouse click,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36184322/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com