Skip to content

Commit

Permalink
Fix blurring current active element within pjax container
Browse files Browse the repository at this point in the history
Fixes #675
  • Loading branch information
mislav committed May 20, 2017
1 parent 573f74c commit 5fce8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5fce8b5

Please sign in to comment.