Commit f99edde
[dev-overlay] Consider scrollbar width for drag positioning (#78865)
This PR fixes a small bug with the dragging logic established in #78716
Namely, I didn't take into account the scrollbar width when calculating
`translate` for each corner. So if the page was scrollable the drag end
would be a bit janky:
https://github.com/user-attachments/assets/17e227e9-7af1-4ab8-91b2-b7cc4d363793
After this PR, the snapping is much smoother with no jank:
https://github.com/user-attachments/assets/06021fae-da61-46b3-b224-11f319835fa31 parent 8312f8a commit f99edde
File tree
1 file changed
+17
-3
lines changed- packages/next/src/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator
1 file changed
+17
-3
lines changedLines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
107 | 121 | | |
| |||
0 commit comments