-
-
Notifications
You must be signed in to change notification settings - Fork 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
Desktop: Fixes #11261 : Ensure spell-check toggle works on macOS #11388
base: dev
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Too many white space changes, deleted comments and log statements in this pull request. We can't merge it as it is |
3a49e64
to
1e7693b
Compare
if (effectiveLanguages.length === 0) { | ||
this.session().setSpellCheckerLanguages([]); | ||
this.session().setSpellCheckerEnabled(false); | ||
return; | ||
} | ||
|
||
this.session().setSpellCheckerLanguages(effectiveLanguages); | ||
this.session().setSpellCheckerEnabled(true); |
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.
Isn't it the same as this?
this.session().setSpellCheckerLanguages(effectiveLanguages);
this.session().setSpellCheckerEnabled(effectiveLanguages.length > 0);
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.
yes, The changes i have done and
this.session().setSpellCheckerLanguages(effectiveLanguages); this.session().setSpellCheckerEnabled(effectiveLanguages.length > 0);
are same.
Should i change my commit to 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.
yes
1e7693b
to
4f8ac1f
Compare
Desktop: Fixes #11261 : Ensure spell-check can be toggled off on macOS
This pull request addresses an issue where spell-check could not be fully disabled on the macOS desktop app, even when explicitly turned off in the settings.
Problem
On macOS, users encountered a problem when trying to disable spell-check. Although the setting was turned off, spell-check continued to underline words, suggesting that it wasn't fully disabled.
Solution
The fix ensures that:
Technical Summary
SpellCheckerServiceDriverNative.ts
file to explicitly callsetSpellCheckerEnabled(false)
when disabling andsetSpellCheckerEnabled(true)
when enabling.setLanguages
to track the session's state after each toggle and confirm that the changes have taken effect.Testing
This PR resolves the underlying issue and provides a more consistent spell-check toggle experience on the macOS platform.
Reference: Fixes #11261
demo :
Screen.Recording.2024-11-13.at.10.33.59.PM.mov