-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(): block enterEditing
after endCurrentTransform
#9513
Conversation
Build Stats
|
enterEditing
after endCurrentTransform
enterEditing
after endCurrentTransform
@ShaMan123 i need to understand why you call endCurrentTransform manually. How do you use it? |
@@ -84,7 +84,7 @@ export abstract class ITextClickBehavior< | |||
this.__lastLastClickTime = this.__lastClickTime; | |||
this.__lastClickTime = this.__newClickTime; | |||
this.__lastPointer = newPointer; | |||
this.__lastSelected = this.selected; | |||
this.__lastSelected = this.selected && !this.getActiveControl(); |
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.
__lastSelected is at this point a wrong name.
It is used exclusively to stop the mouse up default action and does nothing else, is already private.
I would rename it to `_willEnterEditOnMouseUp' and add a JSDOC block on the top where is declared.
What do you think?
I would discourage anyone to build custom logic on those internals state flip flops
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.
Doesn't even need to be done now. We can do an extra PR with that.
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 agree with the name
Since it is a very crucial part of state there are use cases that you need to block the enter editing somehow.
For the majority of cases this small fix should do
The use case: |
Motivation
Description
endCurrentTransform
Changes
Gist
In Action