Brings element to a normal (non-modal) state if it was set to modal before, otherwise throws exception.
In case there was another element set in modal mode before the one being released,
it will regain modal state.
Sets element in a modal state if it is not yet modal, otherwise throws exception.
UI Events originated outside this element get supressed,
except for one capture that is fired upon a click outside modal area.
If there was an element set in modal state before, it will pushed to the stack of modals.