Improve hasFocus check to compare the anchorNode to the parent

$.contains only checks if you are a child of the parent, we also need
to check if you are the parent as that happens when you select a
focusable node (anchorNode === pasteTarget).

Change-Id: Ib4b532b9cb5906be7d7cfb75f2c91d84e610760c