Skip to content

AutoComplete中嵌套Input时出现两个清空按钮 #8356

@SuniRein

Description

@SuniRein
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

Chrome 138, vue 3.5.17

Reproduction link

none

Steps to reproduce

<template>
  <a-auto-complete>
    <a-input allow-clear />
  </a-auto-complete>
</template>

<script></script>

What is expected?

正常的带有一个 clear icon 的 input。

What is actually happening?

出现了两个 clear icons,其中一个是 Chrome 原生的 clear icon。


该问题只能在 Chrome 上复现,在 Firefox 和 CodePen 均不能复现。

使用下面的 css 可以解决这个问题:

input[type='search']::-webkit-search-cancel-button {
  display: none;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions