mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
fix: disabled btn with link should not be focused (#45910)
* fix: disabled btn with link should not be focused * chore: update snapshot * chore: update snapshot
This commit is contained in:
parent
f0a2695df9
commit
2dda417e29
@ -898,6 +898,7 @@ Array [
|
||||
<a
|
||||
class="ant-btn ant-btn-default ant-btn-lg ant-btn-icon-only"
|
||||
href="https://www.google.com"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
@ -1072,6 +1073,7 @@ exports[`renders components/button/demo/disabled.tsx extend context correctly 1`
|
||||
<a
|
||||
class="ant-btn ant-btn-primary"
|
||||
href="https://ant.design/index-cn"
|
||||
tabindex="0"
|
||||
>
|
||||
<span>
|
||||
Href Primary
|
||||
@ -1080,6 +1082,7 @@ exports[`renders components/button/demo/disabled.tsx extend context correctly 1`
|
||||
<a
|
||||
class="ant-btn ant-btn-primary ant-btn-disabled"
|
||||
href="https://ant.design/index-cn"
|
||||
tabindex="-1"
|
||||
>
|
||||
<span>
|
||||
Href Primary(disabled)
|
||||
@ -1550,6 +1553,7 @@ exports[`renders components/button/demo/icon.tsx extend context correctly 1`] =
|
||||
<a
|
||||
class="ant-btn ant-btn-default ant-btn-icon-only"
|
||||
href="https://www.google.com"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
|
@ -805,6 +805,7 @@ Array [
|
||||
<a
|
||||
class="ant-btn ant-btn-default ant-btn-lg ant-btn-icon-only"
|
||||
href="https://www.google.com"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
@ -977,6 +978,7 @@ exports[`renders components/button/demo/disabled.tsx correctly 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-primary"
|
||||
href="https://ant.design/index-cn"
|
||||
tabindex="0"
|
||||
>
|
||||
<span>
|
||||
Href Primary
|
||||
@ -985,6 +987,7 @@ exports[`renders components/button/demo/disabled.tsx correctly 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-primary ant-btn-disabled"
|
||||
href="https://ant.design/index-cn"
|
||||
tabindex="-1"
|
||||
>
|
||||
<span>
|
||||
Href Primary(disabled)
|
||||
@ -1375,6 +1378,7 @@ exports[`renders components/button/demo/icon.tsx correctly 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-default ant-btn-icon-only"
|
||||
href="https://www.google.com"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
class="ant-btn-icon"
|
||||
|
@ -383,6 +383,7 @@ exports[`Button should support link button 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-default"
|
||||
href="https://ant.design"
|
||||
tabindex="0"
|
||||
target="_blank"
|
||||
>
|
||||
<span>
|
||||
|
@ -263,6 +263,7 @@ const InternalButton: React.ForwardRefRenderFunction<
|
||||
style={fullStyle}
|
||||
onClick={handleClick}
|
||||
ref={buttonRef as React.Ref<HTMLAnchorElement>}
|
||||
tabIndex={mergedDisabled ? -1 : 0}
|
||||
>
|
||||
{iconNode}
|
||||
{kids}
|
||||
|
@ -46,6 +46,7 @@ exports[`DropdownButton should support href like Button 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-default ant-btn-compact-item ant-btn-compact-first-item"
|
||||
href="https://ant.design"
|
||||
tabindex="0"
|
||||
/>
|
||||
<button
|
||||
class="ant-btn ant-btn-default ant-btn-icon-only ant-btn-compact-item ant-btn-compact-last-item ant-dropdown-trigger"
|
||||
|
@ -293,6 +293,7 @@ exports[`renders components/flex/demo/combination.tsx extend context correctly 1
|
||||
<a
|
||||
class="ant-btn ant-btn-primary"
|
||||
href="https://ant.design"
|
||||
tabindex="0"
|
||||
target="_blank"
|
||||
>
|
||||
<span>
|
||||
|
@ -289,6 +289,7 @@ exports[`renders components/flex/demo/combination.tsx correctly 1`] = `
|
||||
<a
|
||||
class="ant-btn ant-btn-primary"
|
||||
href="https://ant.design"
|
||||
tabindex="0"
|
||||
target="_blank"
|
||||
>
|
||||
<span>
|
||||
|
Loading…
Reference in New Issue
Block a user