Skip to content

Commit

Permalink
Merge branch 'master' into scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Nov 20, 2015
2 parents 10fc65a + 2273861 commit 9a6383b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
51 changes: 26 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
yii-pjax Change Log
===================

2.0.6 Under development
-----------------
- Bug #23: Fixed loading of scripts in pjax containers (nkovacs, silverfire)

2.0.3 Mar 7, 2015
-----------------
- Chg: Merged changes from upstream (samdark)

2.0.2 Dec 4, 2014
-----------------
- Chg #12: Merged changes from upstream (samdark)

2.0.1 Oct 10, 2014
------------------
- Bug #9: Fixed missing history option in default settings (tonydspaniard)
- New #11: add new option "cache" (macklay)


2.0.0 Mar 20, 2014
------------------
- Bug: Fixed avoid duplicates of _pjax parameter (tof06)
- Bug: Fixed Pjax/GridView and back button (klevron, tof06, tonydspaniard)
yii-pjax Change Log
===================

2.0.6 Under development
-----------------
- Bug #23: Fixed loading of scripts in pjax containers (nkovacs, silverfire)
- Enh #25: Blur the focused element if it's inside Pjax container (GeorgeGardiner)

2.0.3 Mar 7, 2015
-----------------
- Chg: Merged changes from upstream (samdark)

2.0.2 Dec 4, 2014
-----------------
- Chg #12: Merged changes from upstream (samdark)

2.0.1 Oct 10, 2014
------------------
- Bug #9: Fixed missing history option in default settings (tonydspaniard)
- New #11: add new option "cache" (macklay)


2.0.0 Mar 20, 2014
------------------
- Bug: Fixed avoid duplicates of _pjax parameter (tof06)
- Bug: Fixed Pjax/GridView and back button (klevron, tof06, tonydspaniard)
11 changes: 8 additions & 3 deletions jquery.pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,15 @@ function pjax(options) {
window.history.replaceState(pjax.state, container.title, container.url)
}

// Only blur the focus if the focused element is within the container.
var blurFocus = $.contains(options.container, document.activeElement)

// Clear out any focused controls before inserting new page contents.
try {
document.activeElement.blur()
} catch (e) { }
if (blurFocus) {
try {
document.activeElement.blur()
} catch (e) { }
}

if (container.title) document.title = container.title

Expand Down

0 comments on commit 9a6383b

Please sign in to comment.