mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 22:30:27 +08:00
Pjax container only required on first load.
Pjax inserts the response HTML into the container, it doesn't replace it. So any subsequent pjax requests duplicate the container.
This commit is contained in:
@ -102,8 +102,9 @@ class Pjax extends Widget
|
||||
if ($view->title !== null) {
|
||||
echo Html::tag('title', Html::encode($view->title));
|
||||
}
|
||||
} else {
|
||||
echo Html::beginTag('div', $this->options);
|
||||
}
|
||||
echo Html::beginTag('div', $this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,9 +112,8 @@ class Pjax extends Widget
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
echo Html::endTag('div');
|
||||
|
||||
if (!$this->requiresPjax()) {
|
||||
echo Html::endTag('div');
|
||||
$this->registerClientScript();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user