Fix doubleclick bug: element is hidden on double click

Closes #2.
Closes #3.