Skip to content

Commit

Permalink
fixed bug when selector is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-rudakov committed Feb 9, 2022
1 parent 94a7e1c commit d9e195f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion admin/css/zutranslate-blocks.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions admin/js/zutranslate-blocks.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion sass/zutranslate-blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,17 @@ $copy-control-flashing-end-color: $red-color;
}
&__lang {
color: $zutranslate-copy-selected-text-color;
&:hover {
&:hover:not(:disabled) {
background-color: rgba($zutranslate-copy-selected-text-color, 0.05);
color: $zutranslate-copy-selected-text-color;
}
&:focus:not(:disabled) {
box-shadow: 0 0 0 1px rgba($zutranslate-copy-selected-text-color, 0.3) !important;
}
&:disabled, &[aria-disabled="true"] {
color: $zutranslate-copy-selected-text-color;
opacity: 0.5;
}
}
.components-button[aria-expanded="true"] {
color: $zutranslate-copy-selected-text-color;
Expand Down
6 changes: 1 addition & 5 deletions scripts/admin/components/copy-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const CopyControl = ({
<>
<div className={ copyPrefix }>
<Button
disabled={ isDisabled }
className={ mergeClasses(`${copyPrefix}__action`, { 'is-flashing': isFlashing }) }
onClick={ () => copyValue(toLang) }
>
Expand All @@ -126,10 +125,7 @@ const CopyControl = ({
position={ "bottom right" }
onFocusOutside={ closeOutside }
>
<NavigableMenu
// ref={ menuContainer }
onKeyDown={ onEscape }
>
<NavigableMenu onKeyDown={ onEscape }>
{ menuItems }
</NavigableMenu>
</Popover>
Expand Down

0 comments on commit d9e195f

Please sign in to comment.