Skip to content

Commit ef764ec

Browse files
committed
Clear out any focused elements before inserting new page contents
1 parent 8917533 commit ef764ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jquery.pjax.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ function pjax(options) {
261261
window.history.replaceState(pjax.state, container.title, container.url)
262262
}
263263

264+
// Clear out any focused controls before inserting new page contents.
265+
document.activeElement.blur()
266+
264267
if (container.title) document.title = container.title
265268
context.html(container.contents)
266269

0 commit comments

Comments
 (0)