You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason using useClippy hook in a component causes the body to be set as the focus element when that component is initially rendered. This causes the input field to loose focus. Test in blueprintjs popover
The text was updated successfully, but these errors were encountered:
It seems the issue is caused by creating an element in body to copy the text using the old copy method. The navigator clipboard API should be used first if available. And the element should be created inside the focus item instead of body could potentially resolve the issue.
This is a great find. I'm not positive that I'll have bandwidth to address it though, but a PR would be welcome.
I'd have one concern with putting the new input inside the currently focused element, being that that may not work if the currently focused element is a text input. The best bet may be to remember the previously-focused element, then focus it again after the copy action is complete.
For some reason using useClippy hook in a component causes the body to be set as the focus element when that component is initially rendered. This causes the input field to loose focus. Test in blueprintjs popover
The text was updated successfully, but these errors were encountered: