Skip to content

Commit

Permalink
chore: update code comment
Browse files Browse the repository at this point in the history
Signed-off-by: dominictb <[email protected]>
  • Loading branch information
dominictb committed Jun 17, 2024
1 parent c18f515 commit 6f58097
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/hooks/useHtmlPaste/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ const useHtmlPaste: UseHtmlPaste = (textInputRef, preHtmlPasteCallback, removeLi
}

// Pointer will go out of sight when a large paragraph is pasted on the web. Refocusing the input keeps the cursor in view.
// to avoid the keyboard in mobile web if using blur() and focus() function, we just need to dispatch the event to trigger the onFocus handler

// need to trigger the bubbled "focusin" event to make sure the onFocus handler is triggered
// To avoid the keyboard toggle issue in mWeb if using blur() and focus() functions, we just need to dispatch the event to trigger the onFocus handler
// We need to trigger the bubbled "focusin" event to make sure the onFocus handler is triggered
textInputHTMLElement.dispatchEvent(
new FocusEvent('focusin', {
bubbles: true,
Expand Down

0 comments on commit 6f58097

Please sign in to comment.