0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/poll/spec/system
Régis Hanol 6fa7aa7b05
FIX: Preserve scroll position when toggling a poll's results (#41002)
Previously, clicking the button that toggles a large poll between its
results and the ballot scroll-jumped the page far down — often to the
bottom — leaving the poll off-screen and the vote seemingly impossible
to amend (the browser's native scroll anchoring loses its anchor node
when the toggle removes the results table the user is scrolled into).

This change pins the poll's button row and restores its viewport
position with `window.scrollBy` after the swap, so the poll stays
exactly where the user was looking when switching between results and
voting.

Meta:
https://meta.discourse.org/t/large-poll-bug-users-cannot-amend-votes-on-open-polls/405511
2026-06-29 11:41:35 +02:00
..
page_objects/pages FIX: Preserve scroll position when toggling a poll's results (#41002) 2026-06-29 11:41:35 +02:00
anonymous_user_vote_poll_spec.rb DEV: Fix anonymous-related spec flakes (#40502) 2026-06-03 11:37:17 +02:00
dynamic_polls_spec.rb
large_poll_scroll_spec.rb FIX: Preserve scroll position when toggling a poll's results (#41002) 2026-06-29 11:41:35 +02:00
poll_ui_builder_spec.rb