]> git.saurik.com Git - wxWidgets.git/commitdiff
Only send a document complete event when the page is completely loaded, as opposed...
authorSteve Lamerton <steve.lamerton@gmail.com>
Thu, 30 Jun 2011 15:07:52 +0000 (15:07 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Thu, 30 Jun 2011 15:07:52 +0000 (15:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/webview_ie.cpp

index 29b0361f4d7f778b67ae608af8580f95964b6cda..91393120ef24b1305c5515098cba4728b3a007e1 100644 (file)
@@ -500,6 +500,13 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
 
         case DISPID_DOCUMENTCOMPLETE:
         {
+            //Only send a complete even if we are actually finished, this brings
+            //the event in to line with webkit
+            READYSTATE rs;
+            m_webBrowser->get_ReadyState( &rs );
+            if(rs != READYSTATE_COMPLETE)
+                break;
+
             wxString url = evt[1].GetString();
             // TODO: set target parameter if possible
             wxString target = wxEmptyString;