Fix clipboard fallback selection inside dialogs (#433)
This commit is contained in:
1 parent
e738b6ce33
commit
8a8db0eb94
5 files changed
+73
-21
No files matched your search
@@ -80,3 +80,7 @@ Target: a **real 3D board layer** rendered with three.js (vendored ESM, no CDN)
|
||||
- Done: Final Assault / Hidden Core prep takes place on your own half of the boss field (research 09 §1.2): pieces shown at boss-field positions (row − 7; right-hand player mirrored col → 20 − col, RIGHT ↔ LEFT), drop targets and wheel directions mapped back to board coordinates (`prepCamera` → `bossPrep` in public/js/ui/gameLogic.js; covered by the playtest2 browser tests). A scout of such a board (`m.field` prep of a boss round) comes in boss-field coordinates with the player's `side` and is framed the same way, the leader standing at its spawn (0.2.0, community report item 55). Both players of a pair are shown together, as in the battle (0.2.0, community report item 51): the partner's board stands on the other half (`m.private.bossMate` units, already in boss-field coordinates: mirrored on the right half, RIGHT ↔ LEFT; read-only `m:<uid>` views of `render/app.js syncMates`), the whole boss field is lit, a scout carries both halves (`mate`), and the team panel frames the pair's avatars in the official green (`ui/battle bg_team_border` tinted, a plain ring without the local art; `gameLogic teamFrameIds`) from the round's start through the fight.
|
||||
|
||||
---
|
||||
|
||||
Clipboard exports (`ui/clipboard.js`, §28.3) first use the secure Clipboard API. The textarea fallback for LAN
|
||||
play stays inside the active modal/guide focus boundary; it copies only after focus and the complete selection
|
||||
are verified, and cleans up / restores focus on both success and failure. Failure exposes the existing manual-copy UI.
|
||||
@@ -65,3 +65,15 @@ an unsupported elemental-resistance bypass and an unnecessary on-field check on
|
||||
All 285 golden scenarios were regenerated: only `roster` and `diy` changed, (`roster-019`, `roster-038`, `diy-059`–`diy-140`), because the added module expands
|
||||
loadout coverage and the added DIY operator / Shu module expand and regroup the DIY scenarios. `bonds`,
|
||||
`fields`, `matches` and `standins` remained byte-identical. Full integration and browser checks follow separately.
|
||||
|
||||
### 28.3 Clipboard export inside dialogs — #433
|
||||
|
||||
Reported by @RushFTK: exporting settings over an insecure/LAN connection focused the language selector and
|
||||
reported success without copying the export. The fallback textarea was appended outside the active dialog,
|
||||
whose focus trap redirected selection before `execCommand('copy')`.
|
||||
|
||||
`ui/clipboard.js` now selects its temporary textarea inside the active dialog/guide, validates focus and the
|
||||
whole selection before copying, and always removes it and restores focus, including after exceptions.
|
||||
The secure Clipboard API remains first choice; a failed fallback returns false for the existing manual-copy UI.
|
||||
Shared invite/loadout copying uses the same helper. Device tests passed 16/16; independent interaction probes
|
||||
passed 12/12. The real nested-dialog regression is included in `test/ui/modal.e2e.test.js` for integration testing.
|
||||
Reference in new issue
Block a user