自定义光标在使用 window.history.replaceState 时闪烁
Custom cursor blinking when using window.history.replaceState
我在子页面之间导航时使用window.history.replaceState方法来替换URL。我在我的 Web 应用程序中使用自定义光标,当我用新 URL 替换当前 URL 时,我的自定义光标会闪烁一小会儿(我可以看到它被光标:默认替换)。有什么办法可以防止这种情况还是正常行为?谢谢你的回答。
编辑:这是在Chrome浏览器中发生的,在IE11自定义光标不闪烁。
对我来说
听起来像个错误!
将鼠标悬停在普通链接上时,我得到了相同的行为(使用将鼠标悬停在链接上时获得的正常"指针"图标。
我提交了一个铬错误:https://bugs.chromium.org/p/chromium/issues/detail?id=1128213
下面是一个简单的测试用例来重现:
setInterval(
function() {
window.history.replaceState('', '', window.location.pathname);
},
100
);
a {
display: block;
height: 300px;
width: 300px;
background: #3af;
}
<a href="#">Hover me! Does your cursor flicker and/or wiggle?</a>
相关文章:
- 使用History.js保存显示的igGrid列
- 这个代码是什么意思(history.replaceState和history.pushstate)
- 使用history.js使用多个GET参数
- Wrangling Asynchronous chrome.history calls
- HTML5 window.history 不会运行新的 JavaScript
- Backbone.js分页,从 Backbone.history.fragment 中删除页码
- 如何扩展 Backbone.history.navigate
- 正在对dataTable rowSelect调用history.pushState
- 阻止Backbone.history.navigation解码URL片段
- Facebook共享按钮/history.pushstate/错误的url
- 保留动态创建的下拉列表's在事件窗口.history.back()上选择的值-JavaScript
- history.pushState正在删除部分url
- 当执行进入页面时,JavaScript history.back()函数是否生成HttpRequest
- 使用history.back/forward在哈希更改时重新加载页面
- 页面上未检测到JavaScript(history.pushState)
- Ember.js查询参数不尊重replace:true并使用replaceState
- History.js没有'不能在内容脚本中工作
- 自定义光标在使用 window.history.replaceState 时闪烁
- 什么是'数据'在window.history.replaceState
- OS X & iOS Safari history.replaceState limit throws Secu