ui: Fix flash of notifications popdown during page load

- Notifications dropdown is shown briefly before page load. After the page load,
it disappears. This is quite annoying and happens due to the following reason.

  - We add .no-js class to <html> tag and later remove using Javascript.

  - We load most of our Javascirpt using 'defer' attribute leading display of
  layout of content before Javascript is loaded.

  - We also wait for DOMContentLoaded event to fire before removing the .no-js
  class on <html> element.

- Solve the problem by adding special class to notifications dropdown to ensure
that it is not shown even when Javascript is not available.

- There might be a better fix to the problem.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2024-12-12 13:01:43 +02:00
1 parent ab0e127378
commit be7910e901
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -495,7 +495,7 @@ footer {
}
/* No-JS fallbacks for collapsible content */
.no-js .collapse {
.no-js .collapse:not(.no-no-js) {
display: block;
}