iiuni / projektzapisy

System Zapisów na zajęcia w Instytucie Informatyki Uniwersytetu Wrocławskiego
https://zapisy.ii.uni.wroc.pl
30 stars 10 forks source link

#1642 - Removing notifications doesn't hide the widget anymore #1667

Closed fifips closed 5 months ago

fifips commented 5 months ago

Add data-bs-auto-close="outside" to notifications dropdown to prevent it from closing when clicking anywhere inside it. Default behaviour for bootstrap 4/5 by default hides the dropdown whenever you click outside of it or on a dropdown-item element ("All events bubble up with relatedTarget property, whose value is the toggling anchor element" resulting in hiding the widget). Dropdown-item is not used in this widget therefore before the migration it had only been hidden when the click occurred outside of the widget. In bootstrap 5 "All dropdown events are fired at the toggling element and then bubbled up" without the relatedTarget property instead handling all clicks inside according to the data-bs-auto-close specified behavior.

lgpawel commented 5 months ago

OK, czyli poprawka jest tej samej natury, co przy dropdownie z formularzem logowania, tylko tam udało się ją wyłapać ze względu na kluczowość tego elementu, a tu została przegapiona. Być może więcej przegapień nie ma – jedyne inne elementy z data-bs-toggle="dropdown" to menu wyboru semestru w widokach planu zajęć, które powinny zwijać się po kliknięciu również wewnątrz.