Fixed SEGV on arrow events in editor.

Events are now passed to the parent of the selected element.  If the
selected element is a root (i.e. it has no parent), then pass the event
to the selected element.