1. On page load
The autofocus attribute doesn't trigger the Bootstrap-JavaScript to add the is-focused
class to the corresponding (bmd-)form-group
.
<fieldset class="form-group bmd-form-group">
<label for="usernameControl" class="bmd-label-floating">Username</label>
<input type="text" class="form-control text-light" required="" id="usernameControl" name="username" autofocus="">
</fieldset>
2. After some typing
When typing something in the field, the label goes up because is-filled
gets added, but the focus is still not recognized.
<fieldset class="form-group bmd-form-group is-filled">
<label for="usernameControl" class="bmd-label-floating">Username</label>
<input type="text" class="form-control text-light" required="" id="usernameControl" name="username" autofocus="">
</fieldset>
3. After reselecting (desirable output)
Deselecting the text-input (with mouseclicks or the tab-key) and then selecting it again is the only way to get the is-focused
class (and therefore making it look like it should).
<fieldset class="form-group bmd-form-group is-filled is-focused">
<label for="usernameControl" class="bmd-label-floating">Username</label>
<input type="text" class="form-control text-light" required="" id="usernameControl" name="username" autofocus="">
</fieldset>
Question
Is there any fix or workaround to this problem?
Bootstrap Material Design used: https://fezvrasta.github.io/bootstrap-material-design/ (Version 4.1.1)
Source/input html:
<fieldset class="form-group">
<label for="usernameControl" class="bmd-label-floating">Username</label>
<input type="text" class="form-control text-light" required="" id="usernameControl" name="username" autofocus="">
</fieldset>