From 00e328753aae2eb0bf79dc14d1b062e19d073084 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 30 Oct 2015 23:03:25 +0300 Subject: [PATCH] Fixes #10029: Fixed MaskedInput not working with PJAX --- framework/CHANGELOG.md | 1 + framework/widgets/MaskedInput.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 39e19de..3c1c369 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -30,6 +30,7 @@ Yii Framework 2 Change Log - Bug #9915: `yii\helpers\ArrayHelper::getValue()` was erroring instead of returning `null` for non-existing object properties (totaldev, samdark) - Bug #9924: Fixed `yii.js` handleAction corrupted parameter values containing quote (") character (silverfire) - Bug #9984: Fixed wrong captcha color in case Imagick is used (DrDeath72) +- Bug #10029: Fixed MaskedInput not working with PJAX (martrix78, samdark) - Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark) - Enh #3506: Added `\yii\validators\IpValidator` to perform validation of IP addresses and subnets (SilverFire, samdark) - Enh #5146: Added `\yii\i18n\Formatter::asDuration()` method (nineinchnick, SilverFire) diff --git a/framework/widgets/MaskedInput.php b/framework/widgets/MaskedInput.php index bb6ec4b..5563c44 100644 --- a/framework/widgets/MaskedInput.php +++ b/framework/widgets/MaskedInput.php @@ -146,7 +146,7 @@ class MaskedInput extends InputWidget $encOptions = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions); $this->_hashVar = self::PLUGIN_NAME . '_' . hash('crc32', $encOptions); $this->options['data-plugin-' . self::PLUGIN_NAME] = $this->_hashVar; - $view->registerJs("var {$this->_hashVar} = {$encOptions};", View::POS_HEAD); + $view->registerJs("var {$this->_hashVar} = {$encOptions};", View::POS_READY); } /**