Fix selection foreground being misaligned (#1380)
Nasty one! This PR fixes the selection foreground of shapes getting misaligned when the browser zoom was set to something other than 100%. It was always happening all the time on android. ![image](https://github.com/tldraw/tldraw/assets/15892272/f75c19f9-769b-492c-bacd-fe96c5b596ed) ### Change Type - [x] `patch` — Bug Fix ### Test Plan 1. Make a shape. 2. Select it. 3. Change your browser's zoom level. 4. Make sure the selection foreground stay in the right place (eg: indicator, resize handles). ### Release Notes - None (fix for a bug that hasn't released) --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
cd8c92779d
commit
1bf47391a3
1 changed files with 8 additions and 9 deletions
|
@ -275,10 +275,9 @@ input,
|
|||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: visible;
|
||||
pointer-events: none;
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
||||
/* ------------------- Background ------------------- */
|
||||
|
@ -849,7 +848,7 @@ input,
|
|||
.tl-bookmark__heading,
|
||||
.tl-bookmark__description,
|
||||
.tl-bookmark__link {
|
||||
margin: 0;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
@ -858,7 +857,7 @@ input,
|
|||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding-bottom: var(--space-2);
|
||||
margin: 4px 0;
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
.tl-bookmark__description {
|
||||
|
@ -1405,7 +1404,7 @@ input,
|
|||
.tl-error-boundary__canvas {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
inset: 0px;
|
||||
z-index: -1;
|
||||
}
|
||||
/* some browsers seem to have some weird interactions between stacking contexts
|
||||
|
@ -1415,7 +1414,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|||
content: ' ';
|
||||
display: block;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
inset: 0px;
|
||||
z-index: 600;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
@ -1450,7 +1449,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|||
|
||||
.tl-error-boundary__content p {
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.tl-error-boundary__content pre {
|
||||
|
@ -1460,7 +1459,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|||
overflow: auto;
|
||||
font-size: 12px;
|
||||
max-height: 320px;
|
||||
margin: 0;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.tl-error-boundary__content button {
|
||||
|
@ -1506,7 +1505,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
margin: calc(var(--space-4) * -1);
|
||||
margin-top: 0;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.tl-error-boundary__content__actions__group {
|
||||
display: flex;
|
||||
|
|
Loading…
Reference in a new issue