keep board horizontal scroll across refresh: restore scrollLeft after #board-container rebuild; v1.0
This commit is contained in:
13
README.md
13
README.md
@@ -35,11 +35,24 @@ have comments keep showing the count as before.
|
||||
read-only viewers).
|
||||
- **On by default.** Toggle it under "Settings -> Organon Tweaks".
|
||||
|
||||
### Keep the board scroll position across refreshes
|
||||
|
||||
When you drop a card (or Kanboard auto-refreshes the board via polling), it rebuilds the
|
||||
board with `$("#board-container").replaceWith(...)`, and the new element starts scrolled to
|
||||
the far left -- so the view jumps back to the first column. This tweak remembers the
|
||||
horizontal scroll position and restores it as soon as the rebuilt board appears, so the
|
||||
board stays where you were.
|
||||
|
||||
- Implemented in `Asset/js/keep-scroll.js`: it observes the stable parent (the container
|
||||
itself is replaced), reads/writes `scrollLeft` on whichever `#board-container` is current.
|
||||
- **On by default.** Toggle it under "Settings -> Organon Tweaks".
|
||||
|
||||
## Settings
|
||||
|
||||
Global (per Kanboard instance) and admin-only, under "Settings -> Organon Tweaks":
|
||||
|
||||
- **Always show the comment icon on board cards** -- default on.
|
||||
- **Keep the board scroll position across refreshes** -- default on.
|
||||
|
||||
## Requirements
|
||||
|
||||
|
||||
Reference in New Issue
Block a user