Awesome Screenshot shortcuts settings are not saved

NEW
Unassigned

Status

Tech Evangelism
Add-ons
5 months ago
4 months ago

People

(Reporter: vasilica_mihasca, Unassigned)

Tracking

Firefox Tracking Flags

(firefox52 affected, firefox53 affected, firefox54 affected, firefox55 affected)

Details

(Whiteboard: [awe:jid0-GXjLLfbCoAx0LcltEdFrEkQdQPI@jetpack])

Attachments

(1 attachment)

Created attachment 8855309 [details]
Animation.gif

[Affected versions]:
Firefox 55.0a1 (2017-04-05)
Firefox 54.0a2 (2017-04-05)
Firefox 53.0b9 (20170403072723)
Firefox 52.0.2 (20170323105023)


[Affected platforms]:
Windows 10 64-bit
Ubuntu 16.04 32-bit

[Steps to reproduce]:
1.Launch Firefox with a clean profile.
2.Install the following add-on: https://addons.mozilla.org/en-US/firefox/addon/screenshot-capture-annotate/
3.Click on the webextension icon from toolbar and select “Options”.
4.Change the shortcuts settings.
5.Click “Save” button.
6.Reload the page.

[Expected Results]:
All the changes are successfully saved.


[Actual Results]:
Shortcuts changes are not saved and the default values are still displayed. 


[Additional notes]:
This issue reproduces only for 3.0.16 version of Awesome Screenshot webextension.

Comment 1

5 months ago
I took a brief look at this issue and it looks like it have to be fixed in the extension itself,
in particular the "Image Format" is saved and restored as expected, while the "Shortcut Settings" are not
saved and stored correctly.

The following changes to the extension "options.js" source file has fixed the issue in my tests:

    diff -ur awesomescreenshot/javascripts/options.js awesomescreenshot-fix/javascripts/options.js
    --- awesomescreenshot/javascripts/options.js    2017-02-28 15:57:06.000000000 +0100
    +++ awesomescreenshot-fix/javascripts/options.js        2017-04-06 21:12:09.074303829 +0200
    @@ -121,7 +121,7 @@
            $('input:checkbox', $('#menu_shortcuts')).each(function() {
                    var id = this.id,
                            enable = this.checked,
    -                       key = $('select', $(this).parent().siblings('td.select')).attr('value');
    +                       key = $('select', $(this).parent().siblings('td.select')).val();

                    msObj[''+id] = {enable:enable, key:key};
            });
    @@ -129,7 +129,7 @@
            $('input:checkbox', $('#menu_features')).each(function() {
                    var id = this.id,
                            enable = this.checked,
    -                       key = $('select', $(this).parent().siblings('td.select')).attr('value');
    +                       key = $('select', $(this).parent().siblings('td.select')).val();

                    msObj[''+id] = {enable:enable, key:key};
            });
    @@ -182,7 +182,7 @@
                                    $el.attr({checked:'checked'});
                                    $pairingSelect.removeAttr('disabled');
                            }
    -                       $pairingSelect.attr({value:obj.key});
    +                       $pairingSelect.val(obj.key);
                    }
            }
     }

Updated

4 months ago
Component: WebExtensions: Compatibility → Add-ons
Flags: needinfo?(awagner)
Product: Toolkit → Tech Evangelism
The author has been notified.
Flags: needinfo?(awagner)

Updated

4 months ago
Whiteboard: [awe:jid0-GXjLLfbCoAx0LcltEdFrEkQdQPI@jetpack]
You need to log in before you can comment on or make changes to this bug.