-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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: support updating stroke color for text by typing in color picker input #4415
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/excalidraw/excalidraw/6WkUieoibyL4uHWY41qyR64buEsR |
Oh yes, I noticed that just yesterday as well! 👍 |
src/element/textWysiwyg.tsx
Outdated
// case: clicking on the same property → no change → no update → no focus | ||
editable.focus(); |
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.
this one still needs to be there. Does the fix not work while keeping this?
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.
No the editor gets focussed so typing gets reflected on editor instead, I am not sure why do we need this ?
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.
When you click on an already selected button (e.g. you double-click on the same font button, or you open & close the color picker) there's no update which would trigger programmatic focus:
excalidraw/src/element/textWysiwyg.tsx
Lines 518 to 521 in c2a8712
const unbindUpdate = Scene.getScene(element)!.addCallback(() => { | |
updateWysiwygStyle(); | |
editable.focus(); | |
}); |
Don't recall why the pointerdown
preventing on the island isn't enough.
…nput and submit text on color picker blur
There's a strange behavior (likely relating to updates) where once you type a valid color into the HEX input, it blurs it 😄 |
fixed |
This has been an existing issue for text editor
Before
Now