Skip to content

Commit

Permalink
Merge pull request #39042 from appsmithorg/hotfix/focus-ring
Browse files Browse the repository at this point in the history
fix: [cherry pick] Release blocker: focus ring issue in code mirror
  • Loading branch information
btsgh authored Feb 6, 2025
2 parents b2c44ee + 92d1b0a commit a089b9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const EditorWrapper = styled.div<{
.CodeMirror-focused {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline) !important;
outline-offset: var(--ads-v2-offset-outline) !important;
outline-offset: -1px !important;
z-index: 1 !important;
}
`}
Expand All @@ -106,13 +106,14 @@ export const EditorWrapper = styled.div<{
.cm-s-duotone-light.CodeMirror {
border-radius: var(--ads-v2-border-radius);
/* ${(props) =>
props.showFocusVisible &&
props.isFocused &&
`outline: ${
props?.removeHoverAndFocusStyle
? "none"
: "var(--ads-v2-border-width-outline) solid var(--ads-v2-color-outline)"
};
outline-offset: var(--ads-v2-offset-outline);
outline-offset: -1px;
clip-path: unset !important;
`} */
${(props) => props.isFocused && `clip-path: unset !important;`}
Expand Down Expand Up @@ -402,13 +403,17 @@ export const EditorWrapper = styled.div<{
}
}
&:focus-visible {
.CodeMirror.cm-s-duotone-light {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline);
outline-offset: var(--ads-v2-offset-outline);
${(props) =>
props.showFocusVisible &&
`
&:focus-visible {
.CodeMirror.cm-s-duotone-light {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline);
outline-offset: -1px;
}
}
}
`}
${(props) =>
props.size === EditorSize.COMPACT ||
Expand Down

0 comments on commit a089b9c

Please sign in to comment.