The Wayback Machine - https://web.archive.org/web/20211017220041/https://github.com/mdbootstrap/mdb-ui-kit/issues/1462
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Input> in Drop-down menu item causes missing fade-in animation when opening the drop-down #1462

Open
ViRuSTriNiTy opened this issue Aug 3, 2021 · 2 comments

Comments

@ViRuSTriNiTy
Copy link

@ViRuSTriNiTy ViRuSTriNiTy commented Aug 3, 2021

Hi there,

it seems like this is a corner case. I just want to report it to get some feedback whether this is even known or not supported.

Repo steps:

  • add drop-down to the page

  • replace a drop-down menu item with the following mark-up

    <div class="dropdown-item"><input type="text"></div>
    
  • open the drop-down and watch closely to the fade-in animation that is normally applied, it is now missing

This is caused by the following CSS snippet

INPUT:not(:-webkit-autofill), SELECT:not(:-webkit-autofill), TEXTAREA:not(:-webkit-autofill) {
    animation-name: onautofillcancel;
}

It seem like this is either a workaround concerning autofill or a style coming from the browser itself. I cannot find where this is coming from but I found this article that describes how to use this CSS snippet to fix some issues they had in their product.

Does MDB inject the CSS snippet or do you have an idea where this is coming from and why?

So lonG

Daniel

@ViRuSTriNiTy
Copy link
Author

@ViRuSTriNiTy ViRuSTriNiTy commented Aug 3, 2021

A possible workaround is selectively fixing this with CSS only:

input:not(:-webkit-autofill) {
    animation-name: none !important;
}

input should be replaced by a more specific selector that only applies the rule to the concerning input field.

@michal-duszak
Copy link

@michal-duszak michal-duszak commented Aug 10, 2021

Hello, thank you for your feedback. We will investigate this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants