PolymerElements / paper-spinner

Material Design circular activity indicator
https://webcomponents.org/element/PolymerElements/paper-spinner
41 stars 22 forks source link

Spinner visible when active is false in Internet Explorer #91

Open srijken opened 5 years ago

srijken commented 5 years ago

Description

When the active property becomes true, and false again too quickly, Internet Explorer doesn't hide the spinner.

Expected outcome

With active === false the spinner should not be visible

Actual outcome

The spinner is visible if active toggles too quickly.

Live Demo

Live demo is not possible because polymer serve is needed to transpile for Internet Explorer. A working repro of the problem is available at https://github.com/srijken/paper-spinner-ie-repro

Steps to reproduce

  1. Checkout https://github.com/srijken/paper-spinner-ie-repro
  2. Run yarn install
  3. Run polymer serve
  4. Open in IE and click the button.

Browsers Affected

lokjunneo commented 4 years ago

Possible solution for those who encounters similar issues on IE11: Before you set spinner.active = true (or false), remove the spinner class attribute first. (i.e. spinner.removeAttribute("class")). Don't worry, polymer will re-add the classes and somehow everything will work fine.