@speechos/client 0.2.7 → 0.2.8
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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +8 -4
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -2
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7137,6 +7137,8 @@ let SpeechOSWidget = class SpeechOSWidget extends i$1 {
|
|
|
7137
7137
|
const originalContent = this.getElementContent(target) || "";
|
|
7138
7138
|
if (tagName === "input" || tagName === "textarea") {
|
|
7139
7139
|
const inputEl = target;
|
|
7140
|
+
// Ensure DOM focus is on the input before inserting
|
|
7141
|
+
inputEl.focus();
|
|
7140
7142
|
// Restore cursor position before inserting
|
|
7141
7143
|
const start = this.dictationCursorStart ?? inputEl.value.length;
|
|
7142
7144
|
const end = this.dictationCursorEnd ?? inputEl.value.length;
|
|
@@ -7473,8 +7475,6 @@ let SpeechOSWidget = class SpeechOSWidget extends i$1 {
|
|
|
7473
7475
|
// Note: command:complete event is already emitted by the backend
|
|
7474
7476
|
// when the command_result message is received, so we don't emit here
|
|
7475
7477
|
state.completeRecording();
|
|
7476
|
-
// Keep widget visible but collapsed (just mic button, no action bubbles)
|
|
7477
|
-
state.setState({ isExpanded: false });
|
|
7478
7478
|
// Show command feedback
|
|
7479
7479
|
this.showActionFeedback(result ? "command-success" : "command-none");
|
|
7480
7480
|
backend.disconnect().catch(() => { });
|
|
@@ -7632,6 +7632,8 @@ let SpeechOSWidget = class SpeechOSWidget extends i$1 {
|
|
|
7632
7632
|
if (tagName === "input" || tagName === "textarea") {
|
|
7633
7633
|
const inputEl = target;
|
|
7634
7634
|
originalContent = inputEl.value;
|
|
7635
|
+
// Ensure DOM focus is on the input before editing
|
|
7636
|
+
inputEl.focus();
|
|
7635
7637
|
// Restore the original selection/cursor position
|
|
7636
7638
|
const selectionStart = this.editSelectionStart ?? 0;
|
|
7637
7639
|
const selectionEnd = this.editSelectionEnd ?? inputEl.value.length;
|