Skip to content

Commit

Permalink
fix: bind events on active input labels
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Jan 16, 2023
1 parent abb3fac commit b96274d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/plugins/input-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ class InputLabel {
//script disabled if active on init
this._labelOut()
this._labelOver()
this._bindEvents()
}
this._bindEvents()
}

_bindEvents() {
if (['date', 'time'].includes(this._element.getAttribute('type'))) {
return
}
if (this._element.getAttribute('type') === 'file') {
EventHandler.on(this._element, EVENT_BLUR, () => {
this._labelOut()
Expand Down

0 comments on commit b96274d

Please sign in to comment.