-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Clear highlights and pointer on BlockManager even if selection was inside of the editor before clicking outside #2644
base: next
Are you sure you want to change the base?
Conversation
…side of the editor before clicking outside
@@ -620,7 +620,7 @@ export default class UI extends Module<UINodes> { | |||
* Do not fire check on clicks at the Inline Toolbar buttons | |||
*/ | |||
const target = event.target as HTMLElement; | |||
const clickedInsideOfEditor = this.nodes.holder.contains(target) || Selection.isAtEditor; |
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.
I can't remember why it was added. Anyway, I've tested it and it looks like everything is ok. So please add a test (at the Ui.cy.ts
) and a change log
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.
@neSpecc, I just tried to write some tests and encountered an issue with the ui.ts:documentClicked
function:
It appears that this check causes clicks made by Cypress click()
to behave differently from user-generated clicks (because Cypress-generated clicks will always have isTrusted == false). I'm concerned that this might break other tests as well.
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.
@neSpecc, I've commented this out with an explanation in a comment. Seems like we're not triggering Click events anywhere in the code so it shouldn't break anything.
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.
I've found a bug with Block Tunes pressing by Enter. It sometimes removes the block itself (like Enter pressed when block is selected). It can be reproduces in the next
so I'm gonna dig in it soon.
They can be related
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.
Hey @VikhorKonstantin. I've resolved several problems with Enter press. Please, pull the next
and check if the problem still actual
…is always 'false' for Cypress-generated clicks
…licked outside of the editor
Fix: #2643
Clear highlights and pointer on BlockManager even if selection was inside of the editor before clicking outside