Skip to content

Conversation

rockallite
Copy link

When an input is focused, the requestAnimationFrame check loop should change CSS only when it is necessary.

So instead of repeatedly calling showPlaceholderIfEmpty() (which calls removeClass() or addClass() all the time) in the check loop, we should polling input.val() and call hidePlaceholder() or showPlaceholder() only when the boundary condition is satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant