You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this issue during writing tests for yii.js.
After 9807b2e we lose the ability to have pjax links like
<adata-pjaxhref="#">
or
<adata-pjax="" href="#">
(which is essentially the same).
This is because of:
pjax=$e.data('pjax')||0,
"" || 0 resolves to 0.
This condtradicts with confuring pjax described in the docs for example here:
Or try this selector that matches any <a data-pjax href=> links inside a <div data-pjax> container.
I think that the older behavior - pjax !== undefined && pjax !== 0 && $.support.pjax is more correct, also note that @arisk sent the PR including this check in #12737 (383aa47), then it was ignored.
It will be better if we disable pjax only if data-pjax attribute is set to 0 only:
I found this issue during writing tests for
yii.js
.After 9807b2e we lose the ability to have pjax links like
or
(which is essentially the same).
This is because of:
"" || 0
resolves to0
.This condtradicts with confuring pjax described in the docs for example here:
I think that the older behavior -
pjax !== undefined && pjax !== 0 && $.support.pjax
is more correct, also note that @arisk sent the PR including this check in #12737 (383aa47), then it was ignored.It will be better if we disable pjax only if
data-pjax
attribute is set to0
only:Note however that this check in Yii2 pjax adaptation:
needs to be modified accordingly too, because
"" == 0
will evaluate totrue
.Can be:
(
data
returns0
asnumber
).Or in case of a
string
which is returend byattr
for example:Or maybe even better:
The text was updated successfully, but these errors were encountered: