diff --git a/jquery.pjax.js b/jquery.pjax.js index 2fc6b75b..21e09b30 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(options.container, document.activeElement) + var blurFocus = $.contains(context, document.activeElement) // Clear out any focused controls before inserting new page contents. if (blurFocus) {