From e11b9a6be4e1e86009aaa99aa242b5b31a229508 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Tue, 8 Nov 2011 13:34:40 +0000 Subject: [PATCH] Skip spurious blank JavaScript events in wxWebView. Closes #13481 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/webview_ie.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 2c7dd948d7..ec95028679 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -765,8 +765,17 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATING, GetId(), url, target); - event.SetEventObject(this); - HandleWindowEvent(event); + + //skip empty javascript events. + if(url == "javascript:\"\"" && target.IsEmpty()) + { + event.Veto(); + } + else + { + event.SetEventObject(this); + HandleWindowEvent(event); + } if (!event.IsAllowed()) {