diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 663b10ae1..0f313433a 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -219,7 +219,7 @@ addCustomMatchers = (spec) -> @message = -> return "Expected element '" + @actual + "' or its descendants" + notText + " to have focus." element = @actual element = element.get(0) if element.jquery - element.webkitMatchesSelector(":focus") or element.querySelector(":focus") + element is document.activeElement or element.contains(document.activeElement) toShow: -> notText = if @isNot then " not" else ""