diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-06 23:46:53 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 15:51:10 +0300 |
| commit | 50eba82e54c5cc5df65e03916179226d6996798a (patch) | |
| tree | d4366cc055b14974909d0cbafa0582225fe8e0c2 /docs/_static/css/code-snippets.css | |
| parent | 66e74e62bb6efd5cb6af9628fc8dabc5076d1088 (diff) | |
| download | vyos-documentation-50eba82e54c5cc5df65e03916179226d6996798a.tar.gz vyos-documentation-50eba82e54c5cc5df65e03916179226d6996798a.zip | |
fix(codecopier): guard UI updates against out-of-order async completions
Rapid re-clicks queue multiple `navigator.clipboard.writeText`
promises; without a request token, an older promise resolving later
can overwrite the newer click's UI (or have its 2-second timeout fire
on the new click's state). Add a per-button `copyRequestId` that
each click increments and captures locally; the success/failure UI
flip and the revert-timeout body all bail out early if the captured
token no longer matches the current one.
Addresses CodeRabbit review feedback on PR #1890.
\xf0\x9f\xa4\x96 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs/_static/css/code-snippets.css')
0 files changed, 0 insertions, 0 deletions
