diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index e6923c2b50..392e81b722 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -440,10 +440,6 @@ bool wxWebViewWebKit::Create(wxWindow *parent, [[MyPolicyDelegate alloc] initWithWxWindow: this]; [m_webView setPolicyDelegate:myPolicyDelegate]; - - // add history - WebHistory* history = [[WebHistory alloc] init]; - [WebHistory setOptionalSharedHistory:history]; InternalLoadURL(strURL); return true; @@ -958,7 +954,8 @@ void wxWebViewWebKit::EnableHistory(bool enable) void wxWebViewWebKit::ClearHistory() { - [[WebHistory optionalSharedHistory] removeAllItems]; + [m_webView setMaintainsBackForwardList:NO]; + [m_webView setMaintainsBackForwardList:YES]; } bool wxWebViewWebKit::CanUndo()