editor: canvas - fix problem with detaching empty text nodes