-
Notifications
You must be signed in to change notification settings - Fork 208
fix(compass): disable spellcheck before creating window when no network traffic COMPASS-8166 #6853
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
base: main
Are you sure you want to change the base?
Conversation
// to 2001:4860:4860::8888 (the IPv6 address for Google Public DNS). | ||
(target) => | ||
!/^127.0.0.1:|^\[::1\]:/.test(target) && | ||
!/^\[2001:4860:4860::8888\]:443$/.test(target) |
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.
And I guess this is something we can't control at all?
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 haven't found one yet.
It seems like electron command line switches redirect it with the host rules / host resolver rules.
https://www.electronjs.org/docs/latest/api/command-line-switches#--host-rulesrules
I'll spend a bit of time looking into that and circle back before merging.
// Passing a non-resolving URL prevents it from fetching | ||
// as there aren't any options to disable it provided. | ||
// https://github.com/electron/electron/issues/22995 | ||
session.defaultSession.setSpellCheckerDictionaryDownloadURL( |
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.
oh wow. well caught.
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.
nice! tricky one.
COMPASS-8166
We already were disabling the spellcheck when network traffic was disabled, however it looks like it was being disabled after the request for the dictionary would happen. This pr updates when we do the override to happen earlier.
The other change here is ignoring Google's public DNS ip in our no network test as its an expected functionality of chromium:
https://source.chromium.org/chromium/chromium/src/+/main:net/dns/README.md;l=351