eclipse-theia/theia
View on GitHubPreference change does not fire an onPreferencedChanged event
Open
#7685 opened on Apr 28, 2020
bughelp wantedpreferences
Description
Bug Description:
While working on the new preferences-ui we came across a bug related to the preference-service that has been causing some strange and unpredictable behavior on the Electron version (and also appears on master with the original preferences UI). When setting a preference value for some items, most noticeably Application Confirm Exit in User scope, the preference service does not properly register an onPreferenceChanged event, and thus does not update the value in the UI. This has sometimes occurred for other preference items in folder scopes as well, but is consistently an issue for Application Confirm Exit Please see the attached screen recording with console output:
Steps to Reproduce:
- Set up a log for the preferenceService.onPreferenceChanged event (in e.g. packages/preferences/src/browser/preferences-decorator.ts around line 36)
- Build for Electron
- Run in Electron
- Open Preferences in User scope
- Modify preferences using tree view and save the JSON
- Every modify + save cycle should fire an onPreferenceChanged event.
- Modify 'Application: Confirm Exit' and save
- Observe that no event fires

Additional Information
- Operating System: Linux (RHEL7 & Ubuntu tested)
- Theia Version: Electron 1.0.0