Remove focus from form elements as well.
This commit is contained in:
2
index.js
2
index.js
@@ -130,7 +130,7 @@ Pjax.prototype = {
|
|||||||
|
|
||||||
// Clear out any focused controls before inserting new page contents.
|
// Clear out any focused controls before inserting new page contents.
|
||||||
// we clear focus on non form elements
|
// we clear focus on non form elements
|
||||||
if (document.activeElement && !document.activeElement.value && contains(this.options.selectors, document.activeElement)) {
|
if (document.activeElement && contains(this.options.selectors, document.activeElement)) {
|
||||||
try {
|
try {
|
||||||
document.activeElement.blur()
|
document.activeElement.blur()
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
|
|||||||
Reference in New Issue
Block a user