Filter Lists: Toggle doesn't change in periodic events [release-2019-1]
Description
In the Filter Lists section, if we keep clicking over only one side of the whole toggle element (see picture bellow), we will notice that periodically (3*n + k) the toggle doesn't change of state (in fact, it changes twice per click at that moment, check Observations at the bottom). It only happens in the Filter Lists section; it doesn't in the Custom Filters one.
Environment
- Release 2019-1
- Ubuntu 18.04 (KDE)
- Firefox 67.0.4
Reproduction
- get the latest build for the 2019-1 release
- using Firefox, open Advanced settings, go to Filter Lists section and follow the instructions mentioned before in Description.
Observations
- The issue doesn't happen if we only click over the
button
contained in<io-toggle>
, i.e. if we only click over the circular handle. - When the issue happens, toggle is set to the right state by its own
onclick
event (io-toggle.js L50) but then it's forced to a wrong state onupdateItem
method (desktop-options.js L257) becauseitem.disabled
doesn't have the right value. - Such method (
updateItem
) is not being called when the clicked area is not the circular handle. This gave me the hint to solve this issue.
Edited by Adilson Sandoval