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

Navbar scroll: unintended scroll while tabing inside navbar #1274

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented May 23, 2022

Wait for twbs/bootstrap#38220 before merging!

Fixes #1240.

Might be breaking but here is the solution taking into account the different navbar heights.

⚠️ Changes the management of the minimizing behavior of the Orange navbars ⚠️

Check that there isn't any regression in the doc + here

@netlify
Copy link

netlify bot commented May 23, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit de2f723
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/659670ce6c0ff70008504a4a
😎 Deploy Preview https://deploy-preview-1274--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@isabellechanclou isabellechanclou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@louismaximepiton louismaximepiton force-pushed the main-lmp-navbar-scroll-fix branch from 2a217ce to ffe0d88 Compare August 30, 2022 08:38
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond

This comment was marked as outdated.

Copy link
Member

@isabellechanclou isabellechanclou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julien-deramond

This comment was marked as resolved.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@isabellechanclou
Copy link
Member

isabellechanclou commented May 30, 2023

Everything seems OK on Chrome + Mac OS (just see my comment on the accessibility.md file).

Checking on Firefox + Mac OS, there is a problem with the focus. Only the "Toggle sticky/fixed header" button gets it and none of the footer interactive elements. Solution found to restore the focus on MacOS + Firefox and on MacOS + Safari : go to the Mac Apple menu > System settings > Keyboard and to tune on the "keyboard navigation" toggle button.

@louismaximepiton
Copy link
Member Author

Everything seems OK on Chrome + Mac OS (just see my comment on the accessibility.md file). Checking on Firefox + Mac OS, there is a problem with the focus. Only the "Toggle sticky/fixed header" button gets it and none of the footer interactive elements.

Not quite sure to understand, Do you mean in navbar sticky example ? There isn't any footer right ?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@isabellechanclou
Copy link
Member

A keyboard parameter in Mac OS is turned off by default and prevents the focus to be active and visible on links in Safari and Firefox browsers. When turned on, the focus works properly.

@louismaximepiton
Copy link
Member Author

Last commit 1d48c99 updates the values and variables used. It also embeds the migration guide.

@@ -438,7 +438,7 @@ $enable-validation-icons: true !default;
$enable-negative-margins: false !default;
$enable-deprecation-messages: false !default;
$enable-important-utilities: true !default;
$enable-fixed-header: true !default; // Boosted mod: used to apply scroll-padding-top
$enable-fixed-header: false !default; // Boosted mod: used to apply scroll-padding-top
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that the default value of $enable-fixed-header should be false?

Taking https://deploy-preview-1274--boosted.netlify.app/docs/5.3/examples/navbar-sticky/ as an example which doesn't work as expected. Maybe https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/blob/main/site/content/docs/5.3/examples/navbar-sticky/navbar-sticky.css needs to be modified in this PR as well.

@@ -83,6 +83,10 @@ When using a fixed (or sticky) header, tabbing backward often hides focused elem
1. `$scroll-offset-top` variable defines the offset,
2. and [`$enable-fixed-header` allows to drop this rule]({{< docsref "/customize/options" >}}) if you don't use a fixed header.

{{< callout warning >}}
Know that using this feature might lead to unexpected scroll while tabbing inside the header. Prefer `scroll-margin-*` on focusable elements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use scroll-margin-* all the time then?

@louismaximepiton
Copy link
Member Author

louismaximepiton commented Jul 28, 2023

As you said, tried something without scroll-padding as the $enable-fixed-header. It introduces some new CSS variables. Changed the example as well. It's consigned in https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/main-lmp-fixed-header-fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Need Lead Dev Review
Development

Successfully merging this pull request may close these issues.

Orange navbar is automatically scrolling with a serie of tabs
3 participants