We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf92c26 commit 76ce664Copy full SHA for 76ce664
apps/desktop/src/components/MultiStackView.svelte
@@ -159,9 +159,14 @@
159
});
160
}}
161
use:resizeObserver={(data) => {
162
+ // An experiment in prevent content shift. Currently this mechanism
163
+ // allows content shift if the main viewport is scrolled to the left,
164
+ // because the content shift is most annoyin when there are many
165
+ // lanes and you are e.g. making a commit to one of them.
166
if (lastWidth && lanesScrollableEl) {
167
+ // Only offset for sudden large changes.
168
const diff = lastWidth - lanesScrollableEl.clientWidth;
- if (Math.abs(diff) > 100) {
169
+ if (Math.abs(diff) > 300 && lanesScrollableEl.scrollLeft > 300) {
170
lanesScrollableEl.scrollBy({ left: diff });
171
}
172
0 commit comments