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

Unnecessary overflows added to menu styles create scrollbars #2041

Open
gitgitwhat opened this issue Jun 1, 2021 · 2 comments
Open

Unnecessary overflows added to menu styles create scrollbars #2041

gitgitwhat opened this issue Jun 1, 2021 · 2 comments
Assignees
Labels
Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE

Comments

@gitgitwhat
Copy link

Short description
A menu item added to a toolbar adds overflow-y:auto which causes a scrollbar to appear.

What is current behavior
overflow1
overflow2

What is desired behavior
No scroll bar.

Steps to reproduce or sample
Create a layout and add the toolbar below.

    toolbar: {
        name: 'toolbar',
        items: [
            { id: 'options', type: 'menu', text: 'Options', icon: 'fa fa-cog',
                items: [
                    { id: 'logout', text:   'Logout     ', icon: 'fas fa-sign-out-alt', route: 'logout' },
                ]
            }
        ]
    }
@mpf82
Copy link
Collaborator

mpf82 commented Jun 1, 2021

Cannot reproduce: http://jsfiddle.net/ja189qk0/1/

2021-06-01 16_00_33-W2UI Demo_ toolbar_1 - JSFiddle - Code Playground

Tested with Firefox and Chrome.

Please provide a working fiddle next time.

You can use any demo as a starting point (e.g. http://w2ui.com/web/demos/#/toolbar/1) and then click "Show Source Code" button and then the "fiddle with code online" link.

Maybe you have a browser zoom level set?

Or maybe you have more CSS in your page, that changes how the toolbar item is displayed?

@mpf82
Copy link
Collaborator

mpf82 commented Jun 9, 2021

Cannot reproduce: http://jsfiddle.net/ja189qk0/1/

I'll take that back. I cannot reproduce this in Chrome 88, but in Chrome 91 it looks like this:
2021-06-09 10_14_57-Window

Possible work-around until this is properly adressed and fixed:

div.w2ui-menu {
    width: unset !important;
    min-width: 100%;
}

See: http://jsfiddle.net/vb5u20nj/

@mpf82 mpf82 added Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE labels Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE
Projects
None yet
Development

No branches or pull requests

3 participants