Steps to reproduce

Enable navigation module and on mobile visit pages with views tables.
Like:
/admin/content
/admin/content/block

bug on views pages

Issue fork navigation-3392922

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

finnsky created an issue. See original summary.

vensires made their first commit to this issue’s fork.

finnsky’s picture

From my point of view this kind of change should be at least scoped in:

1. Only mobile breakpoint
2. Only tables in content area.

Also probably we need to use
https://www.npmjs.com/package/tua-body-scroll-lock

It is part of core libraries. So can be useful here.

vensires’s picture

Status: Active » Needs review

@finnsky, I have just pushed what could be a solution.
Can you please review it in https://git.drupalcode.org/project/navigation/-/merge_requests/100.diff?

In general, when the user has zoomed out in ex. /admin/content and the navigation menu gets expanded, the tables in the body get limited to the viewport's width which actually causes something like a zoom-in, though not exactly.

rfmarcelino made their first commit to this issue’s fork.

rfmarcelino’s picture

Status: Needs review » Reviewed & tested by the community

Tested and working as intended

finnsky’s picture

Status: Reviewed & tested by the community » Needs work

Re: #5

I think it is not really secure change.

1. `table` may appear in lot of place inside body. Old school frontenders still use them in layouts :)
2. We need it only for mobile. (scope needed)
3. Maybe we can find some selector to identify that tables.
4. Scroll lock still an option.

vensires’s picture

Regarding point (3) we can't really find a more specific selector.

The default /admin/content provides the following HTML:

<table class="views-table views-view-table cols-7 responsive-enabled sticky-enabled" data-once="tableresponsive table-select">

and we also have its sticky header:

<table class="sticky-header" style="visibility: hidden; position: fixed; top: 0px; left: 312px; width: 1425px;">

We could target the "views-table" and "sticky-header" classes specifically, but this would beat the purpose of what we decided today that the module should provide robust code even if the frontend theme does crazy things and, of course, not all tables are views tables and not all tables are responsive tables.

I will fix the mobile scope issue in a future commit.

vensires’s picture

Status: Needs work » Needs review
finnsky’s picture

Status: Needs review » Needs work

MR code still contains rebase artifact.

finnsky’s picture

Pushed another approach with bodyscroll Lock library from core

finnsky’s picture

finnsky’s picture

Status: Needs work » Needs review
finnsky’s picture

Something wrong with Tugboat. Idk how to rebuild it.

finnsky’s picture

Overflow clip for HTML only not fixing initial issue.
But together with BODY overflow clip seems it works.

Please review!

vensires’s picture

Status: Needs review » Reviewed & tested by the community

Tested and it's really working as expected! Thank you!

ckrina made their first commit to this issue’s fork.

ckrina’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.