Skip opening the dropdown if the click event is from the error message (https://github.com/woocommerce/woocommerce-admin/pull/8094)
* Skip focusing the dropdown if the click event is from the error message fix woocommerce/woocommerce-admin#7906 Update conmments * Add changelogs
This commit is contained in:
parent
2f290d79a9
commit
a2f0390ac8
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: Fix
|
||||
|
||||
Fix clicking the error message opens the dropdown. #8094
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
- Fix usage of Wordpress DatePicker component in `DatePicker`. #7982
|
||||
- Fix select-control component label/value alignment. #8045
|
||||
- Fix clicking the error message opens the dropdown. #8094
|
||||
|
||||
# 8.1.1
|
||||
|
||||
|
|
|
@ -217,8 +217,14 @@ class Control extends Component {
|
|||
'is-disabled': disabled,
|
||||
}
|
||||
) }
|
||||
onClick={ () => {
|
||||
onClick={ ( event ) => {
|
||||
// Don't focus the input if the click event is from the error message.
|
||||
if (
|
||||
event.target.className !==
|
||||
'components-base-control__help'
|
||||
) {
|
||||
this.input.current.focus();
|
||||
}
|
||||
} }
|
||||
>
|
||||
{ isSearchable && (
|
||||
|
|
Loading…
Reference in New Issue