dgutov / bmreplace

Quickly replace an existing bookmark in Mozilla Firefox
https://addons.mozilla.org/en-US/firefox/addon/bmreplace/
MIT License
24 stars 3 forks source link

Toolbar position saving method is not reliable #3

Closed dgutov closed 13 years ago

dgutov commented 13 years ago

It can break if, for example, another extension is using the same method, the user places the two buttons next to each other, and the left one is initialized first.

dgutov commented 13 years ago

There's actually two scenarios: a) Another extension with the same method puts a button to its default position to the right of our button, the user doesn't open the customization dialog. If the second button is then initialized first at startup, the buttons will switch places. b) The user customizes the button positions, and the another extension's button is put to the right of this one's. We save its id to use it after restart, and then the button's not there during startup, because the other extension hasn't initialized yet. This will make the button not show up at all.