Closed Bug 1777616 Opened 3 years ago Closed 1 year ago

When using multiple languages in check spelling, the additional dictionaries get disabled after restarting Firefox

Categories

(Core :: Spelling checker, defect)

Firefox 101
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: u709268, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

  1. Install an additional dictionary;
  2. Use "custom settings for history" and check everything (offline website data, site settings, etc.);
  3. Enable the "Delete cookies and site data when Firefox is closed" option;
  4. Type something in a text area and enable more the additional dictionary;
  5. Restart Firefox;
  6. Type something in a text area again.

Actual results:

The additional dictionary won't be enabled.

Expected results:

It seems that additional dictionaries are tied to site settings and when erasing this, the preference is reset.

The additional dictionary setting should be available in Firefox settings and be applied globally for all text areas. It's very annoying to keep enabling the additional dictionary over and over. This defeats the purpose of the functionality.

BTW, this is related to the feature introduced in v100 that enabled support for multiple languages at the same time in check spelling.

Summary: Additional dictionaries get disabled after restarting Firefox → When using multiple languages in check spelling, the additional dictionaries get disabled after restarting Firefox

The Bugbug bot thinks this bug should belong to the 'Toolkit::Data Sanitization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Data Sanitization
Product: Firefox → Toolkit

The severity field is not set for this bug.
:pbz, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbz)

The dictionary preferences are stored per-site and the sanitize-on-shutdown mechanism clears them as part of the "site settings" category:
https://searchfox.org/mozilla-central/rev/fa71140041c5401b80a11f099cc0cd0653295e2c/browser/modules/Sanitizer.jsm#529,536
The content pref service is cleared by the ClearDataService here: https://searchfox.org/mozilla-central/rev/fa71140041c5401b80a11f099cc0cd0653295e2c/toolkit/components/cleardata/ClearDataService.jsm#1104,1122

This seems like intended behavior, since you explictly request Firefox to clear "site settings" which clears site-specific preferences. If you don't want the configured dictionaries to be cleared I suggest to uncheck this option in preferences.

This is a "works as intended" from the data sanitization perspective, but I'll let the folks working on dictionaries consider whether the selected dictionary pref should be a global setting (if it isn't already somewhere?).

Searchfox points to DOM: Editor for this file: https://searchfox.org/mozilla-central/rev/fa71140041c5401b80a11f099cc0cd0653295e2c/editor/spellchecker/EditorSpellCheck.cpp#75. Please move the bug if that's not the correct component.

Component: Data Sanitization → DOM: Editor
Flags: needinfo?(pbz)
Product: Toolkit → Core
Component: DOM: Editor → Spelling checker

Hi :dminor, do you have some thoughts here as the implementer of bug 1402822?

Flags: needinfo?(dminor)

Before we supported multiple dictionaries, it made a lot of sense for this to be a site specific preference, because that would at least have allowed someone to use a dictionary for a particular language on one site and a different language on another site. With support for multiple dictionaries, it's not quite as obvious this is the behaviour that we want, since a lot of people would probably just want all of their dictionaries enabled for every site. That said, I think it's still important that someone be able to choose different dictionaries for different sites, so we'd want to keep this as a site specific preference.

The steps for choosing a dictionary for a site are outlined at [1]. If there's not content pref for the site, we next attempt to identify the language that the site is using, before falling back to dictionaries that the user had chosen for other sites. With multiple dictionary support, this isn't necessarily the most useful behaviour for people, we might prefer to first try dictionaries used on other sites, then identify the language for a site. In this same list, the last resort should probably be to use all dictionaries available instead of the first one in the list.

These would be easy changes to make, I'd like to know what :smaug thinks about this before putting together a patch.

[1] https://searchfox.org/mozilla-central/rev/6ec440e105c2b75d5cae9d34f957a2f85a106d54/editor/spellchecker/EditorSpellCheck.cpp#837

Flags: needinfo?(dminor) → needinfo?(smaug)
Status: UNCONFIRMED → NEW
Ever confirmed: true

So we'd never have site specific settings? I'm not sure I understand the proposal
"so we'd want to keep this as a site specific preference." .. "prefer to first try dictionaries used on other sites"
How would we store the site specific preference in that case and when would we use it?

I wonder if we could just
try dictionaries used on other sites AND identify the language for a site
Enabling a new dictionary explicitly would add it to "dictionaries used on other sites" list.

Flags: needinfo?(smaug)
Severity: -- → S3

I think we'd want to keep the site specific preferences.

If there's no site specific preferences, it looks like we end up using the language for the site, which means we'll only have one dictionary enabled in that case. I'm wondering if that's still the best behaviour for users now that we support having multiple dictionaries at the same time.

Firefox 113.0.1 (64-bit) - I confirm the existence of the problem of the impossibility once and for all for all sites to set by default several languages for checking spelling. In my case, these are Russian (my native language), English British (I studied it at school) and US-English / International.

The title of this issue is incorrect, as Firefox does remember your preferences for specific sites - as long as you haven't set it to delete site preferences on exit. Please rename this issue to something like "Spellcheck settings get reset along site preferences."

If you've decided to keep this behavior, please close this issue and point users who want to check multiple languages by default to Bug 1782129.

Flags: needinfo?(dminor)

I agree, I think we'd want to keep the current behaviour of clearing dictionaries for specific sites along with other site preferences, if the user has chosen to clear site data on exit.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(dminor)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.