Fix crash in MWExtensionNode creation mode

We can't get the directionality from the focused node if there isn't one.

This doesn't add any logic to determine the directionality in creation
mode, filed https://bugzilla.wikimedia.org/show_bug.cgi?id=57421 for that.

Change-Id: I3ff8d48f19c7beef5e24b55712a26d86efa5812a
(cherry picked from commit 1f8d01b72e6cef872929066305b86ea4757bc96a)