Reworked pencil icon logic when user is typing.