From 5e45c4784cbf5183b41073a3a5ac1707d57c4536 Mon Sep 17 00:00:00 2001 From: Artyom Makarov Date: Thu, 13 Jul 2017 13:40:03 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=98Uncaught=20TypeError:=20a.compar?= =?UTF-8?q?eDocumentPosition=20is=20not=20a=20function=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related issues: https://github.com/defunkt/jquery-pjax/issues/675 https://bugs.jquery.com/ticket/7297 --- jquery.pjax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.pjax.js b/jquery.pjax.js index d57269d4..d0f3f4dc 100644 --- a/jquery.pjax.js +++ b/jquery.pjax.js @@ -293,7 +293,7 @@ function pjax(options) { } // Only blur the focus if the focused element is within the container. - var blurFocus = $.contains(context, document.activeElement) + var blurFocus = $.contains(context.get(0), document.activeElement) // Clear out any focused controls before inserting new page contents. if (blurFocus) {