如何使用react-router-dom v4禁用用户单击的浏览器后退按钮?
我在页面上显示一个模式,当用户按下浏览器的后退按钮时,用户被带到上一个屏幕,相反,我想简单地关闭模式。
我试过这么做
onBackButtonEvent(event) {
event.preventDefault();
// the user shouldn't be able to move backward or forward
}
componentDidMount() {
window.onpopstate = this.onBackButtonEvent;
}
但这并
第1页包含按下按钮时的流代码逻辑
If MyDataIsValid() Then
ScriptManager.RegisterStartupScript(me, me.GetType(), "PopUp", "", False)
Response.Redirect("~/Page2", false)
Else
ScriptManager.RegisterStartupScript(me, me.GetType(), "PopUp", <some js for a popup>, False)
E
我正在播放我的视频在PIP模式时,按后退按钮。百事大吉。视频播放完美。导航等,但问题是当我关闭PIP模式。在我最近的应用程序窗口中创建了一个新窗口。图像。See those white windows those are left by pip mode when i click pip mode close button. 有没有办法解决这个问题并关闭活动当我关闭pip模式时请帮助..