mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix WebView bug for fireball/issues/6328
This commit is contained in:
@@ -101,6 +101,8 @@ public class Cocos2dxWebViewHelper {
|
||||
if (webView != null) {
|
||||
webViews.remove(index);
|
||||
sLayout.removeView(webView);
|
||||
webView.destroy();
|
||||
webView = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -156,7 +156,13 @@ namespace experimental{
|
||||
Widget::onExit();
|
||||
_impl->setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
void WebView::cleanup()
|
||||
{
|
||||
ProtectedNode::cleanup();
|
||||
_impl->loadURL("about:blank");
|
||||
}
|
||||
|
||||
void WebView::setBounces(bool bounces)
|
||||
{
|
||||
_impl->setBounces(bounces);
|
||||
|
||||
@@ -211,6 +211,7 @@ public:
|
||||
virtual void setVisible(bool visible) override;
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
virtual void cleanup() override;
|
||||
|
||||
protected:
|
||||
virtual cocos2d::ui::Widget* createCloneInstance() override;
|
||||
|
||||
Reference in New Issue
Block a user