We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pjax:beforeReplace
1 parent cc0dd17 commit c68cf82Copy full SHA for c68cf82
jquery.pjax.js
@@ -281,14 +281,14 @@ function pjax(options) {
281
state: pjax.state,
282
previousState: previousState
283
})
284
- context.html(container.contents)
+ options.context.html(container.contents)
285
286
// FF bug: Won't autofocus fields that are inserted via JS.
287
// This behavior is incorrect. So if theres no current focus, autofocus
288
// the last field.
289
//
290
// http://www.w3.org/html/wg/drafts/html/master/forms.html
291
- var autofocusEl = context.find('input[autofocus], textarea[autofocus]').last()[0]
+ var autofocusEl = options.context.find('input[autofocus], textarea[autofocus]').last()[0]
292
if (autofocusEl && document.activeElement !== autofocusEl) {
293
autofocusEl.focus();
294
}
0 commit comments