Quantcast
Viewing latest article 16
Browse Latest Browse All 229886

Upgrading to ionic 8.5+ breaks ion-toggle keyboard shortcut

Actually, it looks like all you need to do is add myToggle.blur():

const clickToggleById = (key: ValidKeysEnum): void => {
  const myToggle = document.querySelector(`#test-${key} ion-toggle`);
  if (myToggle instanceof HTMLElement) {
    // Only click the toggle if it is not disabled.
    if ('disabled' in myToggle) {
      if (!myToggle.disabled) {
        myToggle.click();
        myToggle.blur();
      }
    } else {
      myToggle.click();
      myToggle.blur();
    }
  }
};

Viewing latest article 16
Browse Latest Browse All 229886

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>