Only enable the 'done' action if an inspector/dialog is in a state that would result in either inserting a non-empty node or changing the mwData attribute of an existing node.
If the ability to insert an empty node is desirable for a particular node type, this behaviour can be overridden.