Added editor directive to avoid event ping-pong