etherpad-lite/src/static
John McLear ef0b257d3e
fix: RTL URL parameter rtl=false now correctly disables RTL mode (#7464)
* fix: RTL URL parameter rtl=false now correctly disables RTL mode

The rtl parameter callback only handled rtl=true (checkVal was 'true'),
so rtl=false was ignored and the layout stayed in RTL from the cookie.
Now accepts any value and sets rtlIsTrue = (val === 'true'). Also
always applies the RTL setting instead of only when true, so switching
from rtl=true to rtl=false takes effect.

Fixes #5559

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: only override RTL when explicitly set via URL/server config

The unconditional changeViewOption('rtlIsTrue', false) overwrote
cookie-persisted RTL preferences and language-direction defaults.
Track explicit setting with rtlIsExplicit flag so we only override
when the user or server actually specified an rtl value.

Adds regression tests for rtl=true, rtl=false, and cookie persistence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: move RTL override into postAceInit to fix race condition

The RTL changeViewOption call was racing with padeditor.init() — the
async setViewOptions(initialViewOptions) at the end of init overwrote
the URL-param-based RTL setting. Moving it into postAceInit ensures
padeditor is fully initialized. Also switched tests to use Playwright
auto-retrying assertions for robustness.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve Playwright test failures for RTL URL parameter

Three issues fixed:
- setCheckbox used .attr('checked') instead of .prop('checked'), so the
  JS checked property was never set and Playwright saw unchecked state
- html10n localized event overwrote RTL setting from URL params and
  cookie preferences; now skips override when either is active
- Server default padOptions.rtl:false was treated as explicit, overwriting
  cookie-persisted RTL; added fromUrl flag to distinguish URL from server

All 94 Playwright tests and 740 backend tests pass locally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:22:57 +01:00
..
css fix: popup notification fits small screens (#7457) 2026-04-05 01:58:41 +01:00
font ui: Add a home icon (#4076) 2020-06-03 10:56:24 +01:00
img editor: UI polish - Etherpad brand as reconnect & loading animation 2021-02-21 13:24:51 +00:00
js fix: RTL URL parameter rtl=false now correctly disables RTL mode (#7464) 2026-04-06 11:22:57 +01:00
skins Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
empty.html ace.js: Don't use srcdoc when creating iframes (see #4975) 2021-07-30 03:51:57 -04:00
favicon.ico Change favicon to be closer to new style 2020-04-19 18:20:21 +02:00
robots.txt staleCode: Remove unnecessary robots.txt entry (#4113) 2020-06-14 20:49:13 +01:00
tests.html /static/tests.html: Fix jquery.js path 2021-02-25 10:14:48 +00:00