There are numerous usability problems:
For all this user inconvenience there are practically no security benefits at all:
This problem is well presented at http://passwordmasking.com.
For better user experience we can add option to reveal typed password.
You can find example of form with password field in Basic Project Template available at https://github.com/yiisoft/yii2-app-basic/blob/master/views/site/login.php
Let's add additional checkbox under the password field.
$form->field($model, 'password')->passwordInput() <?= Html::checkbox('reveal-password', false, ['id' => 'reveal-password']) <?= Html::label('Show password', 'reveal-password')
Add this in the view file:
Now, every time "Show password" is checked text inside the password field is unmasked. Unchecking the box makes the text masked again.