Avoid NPE
Pressing ESC must also fire an update event (related to issue 6705)
Properly clear selections in free html edit mode (related to issue 6705)