Skip to content

Commit 5fbbc02

Browse files
authored
fix(disableBlinkingCursor): caret-color was not applied in shadowdom #1078 (#1079)
Selectors of the outside document dont penetrate the shadowdom, therefore the inheritance of css should be used
1 parent e56ef3e commit 5fbbc02

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wdio/visual-service": patch
3+
---
4+
5+
Fix option "disableBlinkingCursor" to also work within shadowdom

packages/image-comparison-core/src/clientSideScripts/__snapshots__/setCustomCss.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exports[`setCustomCss > should be able to set the custom css with the default op
2525

2626
exports[`setCustomCss > should be able to set the custom css with the with disableBlinkingCursor set to true 1`] = `""`;
2727

28-
exports[`setCustomCss > should be able to set the custom css with the with disableBlinkingCursor set to true 2`] = `" input, textarea, [contenteditable]{caret-color: transparent !important;}"`;
28+
exports[`setCustomCss > should be able to set the custom css with the with disableBlinkingCursor set to true 2`] = `" *{caret-color: transparent !important;}"`;
2929

3030
exports[`setCustomCss > should be able to set the custom css with the with padding set to 0 1`] = `""`;
3131

packages/image-comparison-core/src/clientSideScripts/setCustomCss.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function setCustomCss(cssOptions: CssOptions): void {
2525
const { addressBarPadding, disableBlinkingCursor, disableCSSAnimation, id, toolBarPadding } = cssOptions
2626
const bodyTopPadding = addressBarPadding === 0 ? '' : `body{padding-top:${addressBarPadding}px !important}`
2727
const bodyBottomPadding = toolBarPadding === 0 ? '' : `body{padding-bottom:${toolBarPadding}px !important}`
28-
const disableBlinkingCursorCss = disableBlinkingCursor ? ' input, textarea, [contenteditable]{caret-color: transparent !important;}' : ''
28+
const disableBlinkingCursorCss = disableBlinkingCursor ? ' *{caret-color: transparent !important;}' : ''
2929
const css = (disableCSSAnimation ? disableTransformationsTransitionsAnimations : '') +
3030
bodyTopPadding +
3131
bodyBottomPadding +

0 commit comments

Comments
 (0)