gurayyarar / AdminBSBMaterialDesign

AdminBSB - Free admin panel that is based on Bootstrap 3.x with Material Design
https://gurayyarar.github.io/AdminBSBMaterialDesign
MIT License
2.74k stars 1.56k forks source link

Error in label and form input #123

Closed wagnerfillio closed 5 years ago

wagnerfillio commented 6 years ago

Hello! Can you help with this problem? When using form-line, to add items, everything happens fine, but to edit, I have the following problems.

label of the form-line, mixes with the value of the input, and in the form-line there is a blue border, even if the focus is not in the field.

How can I fix this and leave it as the second image?

modal

google

JaconsMorais commented 5 years ago

did you found a resolution for this issue?

JaconsMorais commented 5 years ago

Look, if you add .form-float into div, he will add an event click to the .form-control .form-float and .form-label classes, when the click event triggers, he will trigger an focus event in input elements inside the element triggered, and when the input element focus event trigger, he will add a class "focused" to elements that contain .form-line, after that, the label will be elevated.

To do that, you need to run $.AdminBSB.input.activate() AFTER the html componentes are loaded.

So, look if you are loading the admin.js(or another name) in the end of file, or, if you are adding html componentes dynamically, you need to run the method mentioned earlier after html loads.

wagnerfillio commented 5 years ago

OK thank you!

acmr93 commented 5 years ago

Look, if you add .form-float into div, he will add an event click to the .form-control .form-float and .form-label classes, when the click event triggers, he will trigger an focus event in input elements inside the element triggered, and when the input element focus event trigger, he will add a class "focused" to elements that contain .form-line, after that, the label will be elevated.

To do that, you need to run $.AdminBSB.input.activate() AFTER the html componentes are loaded.

So, look if you are loading the admin.js(or another name) in the end of file, or, if you are adding html componentes dynamically, you need to run the method mentioned earlier after html loads.

Ty