Previously, the drag-scroll implementation used incremental relative positioning
which accumulated rounding errors over time. This caused the mouse cursor to
gradually drift away from its original position during prolonged drag operations,
particularly noticeable on slower hardware or systems with lower frame rates.
The fix switches from cumulative delta updates to absolute positioning:
- Track initial mouse and scroll positions when drag starts
- Calculate scroll position as: initialScroll - (currentMouse - initialMouse)
- This ensures the visual position remains locked throughout the entire drag
This change eliminates drift by avoiding cumulative floating-point
errors that occurred with the previous += approach.
1. Inverted Logic: The code adds the mouse delta to scrollLeft/scrollTop, but this is backwards. When you drag right, you want the content to move left (scroll increases), and vice versa.
2. Cumulative Rounding Errors: Using += with floating-point deltas accumulates rounding errors over time, especially on slower hardware where mousemove events may be processed less frequently or with more delay.
3. Frame Rate Dependency: On slower hardware, if the browser can't keep up with all mouse events, some movements get skipped, but the positions still update, causing the reference point to drift.
* feat(chapter): add "mark all as read" option
Added new translation key for "Mark all as read" and updated ChaptersToolbarMenu to use it in the tooltip when marking all chapters as read.
* refactor(i18n): create global download key for generic actions
* feat(i18n): add filter and sort string to chapter toolbar
* fix(i18n): update tooltip text for clear selection action
* apply `yarn lint --fix`
The loading placeholder was never removed in case the whole source catalogue was added to the library and the "hide entries in library" setting has been enabled.
In case e.g., the "tracking" should not get migrated, the "migration action" was still created.
While creating the action, an error was thrown because the "tracking" information was missing, as expected, since it's not required.
To prevent this, the actions should only get created in case they are actually required for the migration.
Bug introduced with ff58dcc480.
With 18ddf46f17 the "appearance" settings got moved from the local storage to the server metadata.
However, the old settings still remained in the local storage, which includes a value with they key "appTheme". This was the id of the selected app theme.
With ff58dcc480 this key got resued for the app theme object, which leads to a type error in case the old setting is still present in the local storage.