fix exception on FF where focusedNode can be "document", in which focusedNode.tagName is undefined, refs #16730 !strict