@meetelise/chat 1.22.25 → 1.22.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.22.25",
3
+ "version": "1.22.26",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -104,6 +104,21 @@
104
104
  </style>
105
105
  </head>
106
106
  <body>
107
+ <script>
108
+ document.addEventListener("keydown", (e) => {
109
+ if (e.target.tagName.toLowerCase() === "me-chat") {
110
+ e.preventDefault();
111
+ console.log(
112
+ "🚫\n" +
113
+ "Hijacking your keyboard.\n" +
114
+ "Sure would be annoying if some websites used libraries which inserted document-level key listeners which prevent typing in webchat.\n" +
115
+ "Glad that's not a thing and never will be.\n" +
116
+ "Anyway, if you're seeing this message you've messed up our focus trap and should fix it. Thanks.\n" +
117
+ "🚫\n"
118
+ );
119
+ }
120
+ });
121
+ </script>
107
122
  <!-- <script>
108
123
  <!-- Before closing body tag -->
109
124
  <!-- (function (d, s, id, k, r) {
@@ -4283,6 +4283,8 @@ otherwise there's some empty space at the bottom of the button, which interferes
4283
4283
  id="pubnub-chat-container"
4284
4284
  class=${fe({"pubnub-container__mobile":ci(),"pubnub-container__desktop":!ci()})}
4285
4285
  style=${Pe(s)}
4286
+ @keydown=${e=>e.stopPropagation()}
4287
+ @keyup=${e=>e.stopPropagation()}
4286
4288
  >
4287
4289
  <div
4288
4290
  id="leasing-header"
@@ -147,6 +147,7 @@ export class PubnubChat extends LitElement {
147
147
  }
148
148
  await this.myPubnub?.sendMessage(message);
149
149
  };
150
+
150
151
  firstUpdated(): void {
151
152
  this.messages = this.myPubnub?.simpleChatMessages || [];
152
153
  this.myPubnub?.addChatListener(
@@ -581,6 +582,8 @@ export class PubnubChat extends LitElement {
581
582
  ["pubnub-container__desktop"]: !isMobile(),
582
583
  })}
583
584
  style=${styleMap(styles)}
585
+ @keydown=${(e: KeyboardEvent) => e.stopPropagation()}
586
+ @keyup=${(e: KeyboardEvent) => e.stopPropagation()}
584
587
  >
585
588
  <div
586
589
  id="leasing-header"