-
Notifications
You must be signed in to change notification settings - Fork 22
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
#7630: Fix DraftJS support on empty fields #7644
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7644 +/- ##
=======================================
Coverage 72.94% 72.94%
=======================================
Files 1230 1231 +1
Lines 38309 38324 +15
Branches 7188 7192 +4
=======================================
+ Hits 27943 27956 +13
- Misses 10366 10368 +2 ☔ View full report in Codecov by Sentry. |
/** | ||
* Set the value of an input, doing the right thing for check boxes, etc. | ||
*/ | ||
async function setValue({ | ||
async function findAndSetValue({ |
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 moved the generic "value-setting" logic out of this function and file. They could be replaced in the future.
Setting values into custom editors is complex. We might eventually want to see how Grammarly does it. However they have issues with a lot of sites too.
Some editors expose a DOM-accessible API, but are increasingly more "private" and difficult/impossible to access (like Monaco editor). Some examples are in
https://github.com/fregante/GhostText/blob/main/source/advanced-editors-messenger.js
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
Review tips
The actual bug fix can be seen in
e436878
(#7644). The rest of the changes are to extract the utility functions and test someDemo
Tested on https://draftjs.org
Some fields are available on https://ghosttext.fregante.com/test/ (but not DraftJS at this point)
Screen.Recording.5.mov
Checklist
src/tsconfig.strictNullChecks.json
(if possible)