-
Notifications
You must be signed in to change notification settings - Fork 782
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
feat #3241
feat #3241
Conversation
🦋 Changeset detectedLatest commit: 23c5a27 The changes in this PR will be included in the next version bump. This PR includes changesets to release 57 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ignoreReadOnly, | ||
selectionExpanded, | ||
setWaitForCollapsedSelection, | ||
]); | ||
|
||
React.useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixfeng33
This change prevents automatic testing tools from selecting text and displaying the floating toolbar.
We use playwright with text locators, for example:
await this.page.getByText('Random text').selectText()
, these locators had the effect of making the floating toolbar appear but now this is no longer the case.
I tried to trigger the mouseup
event manually from playwright but without success.
Why do we have to listen to the mouseup event in this hook?
Do you have a workaround for my use case ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listen to the mouseup event because we just need open the toolbar when the selection is end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I'm not very familiar with Playwright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixfeng33 It looks like this change also breaks the toolbar for keyboard users. Can we change it to only suppress the toolbar if the pointer is currently down and the toolbar was hidden before pointerdown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that the toolbar doesn't appear when you use shift to select? This is a known issue, and I am planning to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. It seems like making the dependency on specific input events optional (by waiting for pointerdown before suppressing the toolbar) would fix both the keyboard accessibility problem and @seb-mynotary's Playwright problem.
I have seen that in the Readme you have this link: https://platejs.org/docs/math to your doc but it does not lead anywhere. Where can I access the docs? |
sorry for causing you confusion the docs is not available yet. |
Description
See changesets.