Skip to content

Commit 2106249

Browse files
committed
check contenteditable elements for value change
1 parent 920a5c1 commit 2106249

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "14.3.2",
3+
"version": "14.3.3",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/14.3.3/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapCopilotTours.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ export default class GleapCopilotTours {
736736
const inputModeType = currentStep.inputType ?? "default";
737737
if (inputModeType === "default") {
738738
function handleInputEvent(e) {
739-
if (e.target.value.length === 0) return;
739+
if (e?.target?.value?.length === 0) return;
740740
const cursor = document.getElementById(
741741
`copilot-info-bubble-content`
742742
);
@@ -758,6 +758,11 @@ export default class GleapCopilotTours {
758758
element.addEventListener("input", handleInputEvent, {
759759
once: false,
760760
});
761+
if (element.hasAttribute("contenteditable")) {
762+
element.addEventListener("keyup", handleInputEvent, {
763+
once: false,
764+
});
765+
}
761766
element.addEventListener(
762767
"blur",
763768
() => {

0 commit comments

Comments
 (0)