Fix itext editing exit when clicking on other objects. Closes #1019