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

Bug: Mobile sidebar breaks if opened during initialization #4893

Open
2 of 3 tasks
columk1 opened this issue Dec 30, 2024 · 0 comments
Open
2 of 3 tasks

Bug: Mobile sidebar breaks if opened during initialization #4893

columk1 opened this issue Dec 30, 2024 · 0 comments
Labels
Status: Needs Review This issue/PR needs an initial or additional review Type: Bug Involves something that isn't working as intended

Comments

@columk1
Copy link

columk1 commented Dec 30, 2024

Checks

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this issue follows the Bug: brief description of bug format, e.g. Bug: Lesson complete button does not update on click
  • Would you like to work on this issue?

Bug description

If the hamburger menu icon is clicked too soon after navigation, the sidebar component can't be opened until the page is refreshed. This happens even if the page appears to be fully loaded (after progress bar/spinner is gone from browser).

Reproduced on Chrome (Android) and Chrome/Safari (Mac)

How to reproduce

Navigate to any page at screen width < 768px and click the hamburger menu icon during page load or soon after the browser appears to have finished loading.

Expected behavior

The button should be disabled until the component is initialized.

What browsers are you seeing the problem on?

Chrome

What OS are you using?

MacOS

Discord Name

columk

Additional Comments

I wonder would adding a check in open_modal_controller.js to see if the controller is ready before calling this.visibilityOutlet.on() would solve it.

Otherwise the button could be initialized with a disabled attribute which could then be removed in the controller's connect function.

@columk1 columk1 added Status: Needs Review This issue/PR needs an initial or additional review Type: Bug Involves something that isn't working as intended labels Dec 30, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog / Ideas in Main Site Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review This issue/PR needs an initial or additional review Type: Bug Involves something that isn't working as intended
Projects
Status: 📋 Backlog / Ideas
Development

No branches or pull requests

1 participant