From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Gabriel Goller <g.goller@proxmox.com>
Subject: [pbs-devel] applied-series: [PATCH proxmox-backup v2 1/2] gui: remove document.execCommand calls
Date: Mon, 25 Mar 2024 16:46:58 +0100 [thread overview]
Message-ID: <c130ae52-2deb-4a8b-b4db-89a35a8e3a35@proxmox.com> (raw)
In-Reply-To: <20240314093227.44927-1-g.goller@proxmox.com>
Am 14/03/2024 um 10:32 schrieb Gabriel Goller:
> The `document.execCommand` call is deprecated since a few years [0] so I
> went ahead and removed it. We only use it to copy stuff to the clipboard
> and the recommended way now is to use `navigator.clipboard.writeText`
> [1]. `writeText` is kind of new, but I think we'll be alright regarding
> compatibility (Compat table is also available at [1]).
>
> Making the handler functions async is okay because extjs executes the
> handler and does not expect any result from it, nor does it need to do
> some work afterwards.
>
> [0]: https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand
> [1]: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
>
> v2, thanks @Dominik:
> - add explanation of why async handlers are ok
>
> www/ServerStatus.js | 8 +++-----
> www/panel/NodeInfo.js | 5 ++---
> www/window/DatastoreRepoInfo.js | 5 ++---
> www/window/TokenEdit.js | 6 +++---
> 4 files changed, 10 insertions(+), 14 deletions(-)
>
>
applied, thanks!
prev parent reply other threads:[~2024-03-25 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 9:32 [pbs-devel] " Gabriel Goller
2024-03-14 9:32 ` [pbs-devel] [PATCH proxmox-backup v2 2/2] fix #5188: gui: add copy to clipboard on snapshots Gabriel Goller
2024-03-25 15:46 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c130ae52-2deb-4a8b-b4db-89a35a8e3a35@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=g.goller@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox