-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text Selection popover doesn't run action in Gmail email composer #7729
Comments
Findings:
So:
|
A couple more demos showing the regular behavior, clicking and dragging: and the broken behavior on Gmail, where it disappears on Gmail is breaking the native behavior by manually deselecting the text on ![]() and it ends up calling either one of these:
pixiebrix-extension/src/contentScript/selectionTooltip/tooltipController.tsx Lines 86 to 94 in 4878e51
Side note: The logic in these two should be combined. I'm unsure on how to proceed because it's hard to determine whether the Maybe the solution is to use |
Reopening because it's still not generally working on 1.8.10-beta.2-mv3 on Chrome: https://www.loom.com/share/1934bedba08f43dd88066fd2fea11f25?sid=5cb7826f-d245-4264-8dc7-a91e43f93602 @fregante should I give MV2 a try? @grahamlangford I don't think this is a blocker for 1.8.10 |
Which two are you referring to? The React Component and tooltipController? Or the listeners in showTooltip and initSelectionTooltip? For me, splitting the React Component and Controller isn't essential, the crux of the issue is still deciding:
There's likely a gotcha around useDocumentSelection. We should probably be using the selection at the time the popover was shown vs. at the time the button was clicked
A couple of options are:
Going to try some changes. Removing the hide on |
Co-authored-by: Todd Schiller <[email protected]>
I was referring to the two pieces of code I linked before the note, and then also merge the logic into the React component. I think it's easier to reason about it when the logic is in a single place. Also delays might be easier to add in the React component without risking that they get out of sync (e.g. a |
Co-authored-by: Todd Schiller <[email protected]>
Describe the bug
Text selection popover over buttons don't work in Gmail email composer
To Reproduce
Actual behavior
Expected behavior
Investigation
selectionchange
event fires with an empty selection, so tooltipController calls hideTooltip. It likely calls the Abort before the click has a chance to runhideTooltip()
in the selectionchange handler, the action runs, but doesn't see any selected textDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: