Skip to content

`about:preferences#connection`: closing dialogs by pressing "cancel" causes settings changes

Summary

See title

Steps to reproduce:

  1. Go to about:preferences#connection
  2. Add a bridge manually, the bridges toggle will become checked.
  3. Click "Select built-in bridge", then in the dialog click "cancel"

What is the current bug behavior?

The "Your Current Bridges" toggle will become unchecked.

What is the expected behavior?

Dialog closes and nothing else happens

This is not the only bad behavior related to this.

Here's the responsible code:

I'm thinking of passing the callbacks to the dialog constructors and hooking them up with this._dialog.addEventListener("dialogaccept" instead of utilizing closingCallback. An alternative is to put the callback code inside the dialog's script file.

If you agree with my approach, I'd like to implement it.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information