Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes all elements are collapsed by default, unable to change state #11

Open
sypets opened this issue Jun 24, 2024 · 0 comments · May be fixed by #12
Open

Sometimes all elements are collapsed by default, unable to change state #11

sypets opened this issue Jun 24, 2024 · 0 comments · May be fixed by #12

Comments

@sypets
Copy link

sypets commented Jun 24, 2024

Update: Problem might be due to using outdated browser. So, better alternative might be updating browser. See compat. matrix: https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaExpanded#browser_compatibility


It has been reported at least twice since extension was activated. At first I could not reproduce it, but after switching browser from Chromium to Firefox, I could.

It was reported that all elements were collapsed. It was possible to expand individual elements, but after reloading the page, the behaviour was the same (all elements collapsed).

Overrall, we saw 2 different problems:

  1. when element was collapsed, this was not saved. Looks similar to Collapse state is not saved in user settings #1 and Collapse state is still not saved in user settings #7 and seemed to be fixed with [BUGFIX] Make sure state is stored in user settings #10
  2. (this issue) all elements collapsed, not possible to change behaviour. Depends on Browser

I will create PR.

Possible solution

changing

- if (btn.ariaExpanded == 'true') {
+ if (btn.getAttribute('aria-expanded') == 'true') {

in PageModuleCollapse.js

was reported to work.

Info

Behaviour may be browser-dependant, see also

Versions

  • TYPO3: 11.5.38
  • container: 2.3.6
  • collapse: latest 1.0.0 (or latest "main")

reproduced with

  • Firefox 115.12.0esr (64-bit) "Extended Support Release", Xubuntu (Linux)

Note: I usually do not use Firefox, this might be an outdated version. The other colleagues are usually under Windows using automatically updated versions.

sypets added a commit to sypets/collapse that referenced this issue Jun 24, 2024
Depending on brower version, the value of the aria-expanded
attribute could sometimes not be read correctly. This resulted
in elements always being collapsed.

Resolves: b13#11
@sypets sypets linked a pull request Jun 24, 2024 that will close this issue
mwehr pushed a commit to mwehr/collapse that referenced this issue Jun 24, 2024
Depending on brower version, the value of the aria-expanded
attribute could sometimes not be read correctly. This resulted
in elements always being collapsed.

Resolves: b13#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant