Fully clear existing ActionObject before re-using it. Fixes context menu missing after close & re-open home tab.

This commit is contained in:
Hadi Nategh 2015-02-11 10:35:05 +00:00
parent ea560e8cbf
commit 4373545152

View File

@ -527,9 +527,14 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
objectManager.manager.getActionById(this.id) || objectManager.manager
));
}
else
{
widget_object.setAOI(new et2_action_object_impl(this, this.getDOMNode()));
}
// Delete all old objects
widget_object.clear();
widget_object.unregisterActions();
// Go over the widget & add links - this is where we decide which actions are
// 'allowed' for this widget at this time