BrightspaceUI / core

A collection of accessible, free, open-source web components for building Brightspace applications.
Apache License 2.0
64 stars 24 forks source link

d2l-switch-visibility - endless loop of toggling switch state on screen size for mobile #959

Open AKobets opened 3 years ago

AKobets commented 3 years ago

Bug was found on edit learning path when testing on real android device and on google chrome simulator for responsive design. When screen is too small to display visibility toggle with button, it switches to display only eye with/without cross line. If I click the eye icon to change the state, then the page displays icon that is endlessly changing from on to off to on in a loop and it is actually submitting http requests for each state change.

Steps to reproduce on CD or local dev site: Setup: Login as d2lsupport go to /d2l/le/learningpaths/admin/view In chrome dev tools select screen resolution for mobile device, for example Galaxy S5 Click create learning path - by default learning path visibility is off and is not cickable. Click Add Activity and add 1 course. It makes the visibility icon clickable. Click visibility toggle to make the learning path visible.

image

dlockhart commented 3 years ago

I think this is actually a custom usage of <d2l-button-icon> that learning paths is rendering at this resolution? The visibility toggle component always has that blue outline around it, only the "Visibility" text gets hidden responsively.

Screen Shot 2020-11-18 at 4 43 35 PM