@fluid-topics/ft-copy-block 1.2.39 → 1.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,8 +23,16 @@ class FtCopyBlock extends FtLitElementWithI18n {
23
23
  <div part="container">
24
24
  ${navigator.clipboard ? html `
25
25
  <div part="button-container">
26
- <ft-tooltip part="tooltip" text=${copyBlock.messages.tooltipMessage()} position="bottom" exportpartsPrefix="tooltip">
27
- <ft-button icon="CLONE" part="button" exportpartsPrefix="button" @click=${this.copyContents}></ft-button>
26
+ <ft-tooltip part="tooltip"
27
+ manual
28
+ text=${copyBlock.messages.copySuccessMessage()}
29
+ position="bottom"
30
+ exportpartsPrefix="tooltip">
31
+ <ft-button icon="CLONE"
32
+ part="button"
33
+ label=${copyBlock.messages.tooltipMessage()}
34
+ exportpartsPrefix="button"
35
+ @click=${this.copyContents}></ft-button>
28
36
  </ft-tooltip>
29
37
  </div>
30
38
  ` : nothing}
@@ -42,11 +50,7 @@ class FtCopyBlock extends FtLitElementWithI18n {
42
50
  async copyContents() {
43
51
  try {
44
52
  await navigator.clipboard.writeText(this.shadowRoot.host.innerText);
45
- this.tooltip.manual = true;
46
- this.tooltip.text = copyBlock.messages.copySuccessMessage();
47
53
  await this.tooltip.show(1000);
48
- this.tooltip.text = copyBlock.messages.tooltipMessage();
49
- this.tooltip.manual = false;
50
54
  }
51
55
  catch {
52
56
  console.log("Failed to copy to clipboard");