channel-worker 1.0.32 → 1.0.33
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/lib/command-poller.js +4 -1
- package/package.json +1 -1
package/lib/command-poller.js
CHANGED
|
@@ -633,11 +633,14 @@ class CommandPoller {
|
|
|
633
633
|
await new Promise(r => setTimeout(r, 300));
|
|
634
634
|
// Type text — use char-by-char for inputs that need keystroke events (press_enter mode)
|
|
635
635
|
if (press_enter) {
|
|
636
|
-
// Type each character
|
|
636
|
+
// Type each character with delay so React processes keystrokes
|
|
637
637
|
for (const char of text) {
|
|
638
638
|
await send('Input.dispatchKeyEvent', { type: 'keyDown', key: char, text: char });
|
|
639
639
|
await send('Input.dispatchKeyEvent', { type: 'keyUp', key: char });
|
|
640
|
+
await new Promise(r => setTimeout(r, 50));
|
|
640
641
|
}
|
|
642
|
+
// Extra delay after comma for Facebook to confirm tag
|
|
643
|
+
await new Promise(r => setTimeout(r, 500));
|
|
641
644
|
} else {
|
|
642
645
|
await send('Input.insertText', { text });
|
|
643
646
|
}
|