]> git.saurik.com Git - wxWidgets.git/commitdiff
Skip spurious blank JavaScript events in wxWebView.
authorSteve Lamerton <steve.lamerton@gmail.com>
Tue, 8 Nov 2011 13:34:40 +0000 (13:34 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Tue, 8 Nov 2011 13:34:40 +0000 (13:34 +0000)
Closes #13481

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/webview_ie.cpp

index 2c7dd948d7a72489c06c272a2b8327881ac750fa..ec95028679d4a326175820cb66f89df03d58adec 100644 (file)
@@ -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())
             {