Skip to content

Commit

Permalink
fix: prevent input from losing focus while animation
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Sep 17, 2021
1 parent c3fe4ae commit b8e1833
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/checkbox/src/vaadin-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ class Checkbox extends SlotLabelMixin(
opacity: 0;
cursor: inherit;
margin: 0;
/* A workaround to prevent loosing focus during CSS animations. */
z-index: 1;
}
</style>
<div part="container">
Expand Down
2 changes: 2 additions & 0 deletions packages/checkbox/theme/lumo/vaadin-checkbox-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ registerStyles(
/* Checkmark */
[part='checkbox']::after {
content: '';
pointer-events: none;
display: inline-block;
width: 0;
height: 0;
Expand Down Expand Up @@ -116,6 +117,7 @@ registerStyles(
/* Used for activation "halo" */
[part='checkbox']::before {
pointer-events: none;
color: transparent;
display: inline-block;
width: 100%;
Expand Down
2 changes: 2 additions & 0 deletions packages/checkbox/theme/material/vaadin-checkbox-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ registerStyles(
[part='checkbox']::before {
/* Needed to align the checkbox nicely on the baseline */
content: '\\2003';
pointer-events: none;
display: inline-block;
width: 100%;
height: 100%;
Expand All @@ -54,6 +55,7 @@ registerStyles(
/* Used for the checkmark */
[part='checkbox']::after {
content: '';
pointer-events: none;
display: inline-block;
width: 10px;
height: 19px;
Expand Down

0 comments on commit b8e1833

Please sign in to comment.