-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Q-Menu gets squashed and shows scrollbar if it does not fit to the right and to the bottom both. #8554
Comments
Hello, can you please test if this fixes the problem for you? In package.json replace quasar dependency with: Then do a yarn or npm install and start the app again. Please report if you find something not working. |
Multumesc Dan,
(On the screenshots: the q-menu's on the images are still Thanks again for your quick response! Best, |
Hmmm. Maybe it would be worth to make this automatic behaviour disablable. (or force-on-screen="" a/y/x/t/b/l/r) |
I cannot reproduce the case with |
You may be right, the q-menu is within the contents of a q-scroll-area that is eventually within a q-drawer. It must be pretty difficult to determine correct positioning for a context menu in a very general case. |
If you could prepare a reproduction case for this i can tweak the algorithms a little. |
Great job with #quasar-pdan-v1.15.4-beta.2 , the left-right jitter is gone and min-width/min-height is respected! 😎 The up-down jitter is still there, it happens exactly when it is on the border. (I'm not sure why within a q-scroll-area it should get displayed up though if there's enough scrollable space.) Later, I'll try and assemble a small project that reproduces the up-down jumps and the unnecessary up-display when there's scrollable space below. |
Screen.Recording.mov |
https://pdanpdan.github.io/quasar-docs/start/umd#Installation Clone any example from my branch of the docs, or use a standard quasar codepen and replace the js and css with the ones from the linked page. The menu only accounts for the space between the anchor point and the window if the anchor is fixed or in a fixed container. |
Cool cool, thanks, I've updated the pen, https://codepen.io/barnab-s-szabolcs/pen/dyOmeWd
The pen uses:
So you say, for q-scroll-area's the up display is typically the expected behavior. (I mean, using a q-scroll-area within a q-drawer puts q-scroll-area's contents into a fixed container.) |
You can try beta.3 - it should improve on the initial positioning. If the content of the dialog takes some time to be rendered (and on the initial render it is smaller than the final one) then the dialog might end up in the requested position and with scroll bars - you can mitigate this with a min-width/height. About the positioning when the anchor is inside a scrollable element (other than the document.scrollingElement) - it is too complex to compute, I'm not sure it's worth, but I'll think about it more. |
Yes, I think you're right. Q-menu is meant to be a toolbar menu anyways and I'm very thankful for you picking up and fixing this issue. I have checked the context menus on iPhone mobile and if the menu is opened from the center |
@BarnabasSzabolcs Sorry, I was busy lately. What do you mean by
Btw, you can use |
Describe the bug
I use the q-menu component as a contextual menu, showing an "advanced" content (not only a list)
that sometimes does not fit where the menu would be normally located (top-left to target's bottom-left),
and if the right side of the target and the bottom side of the target does not have enough space at the same time,
the q-menu does not only get relocated which works nicely, but the window also gets squashed and the contents appear with a scrollbar.
Codepen/jsFiddle/Codesandbox (required)
Fork a Codepen (https://codepen.quasar.dev) or a jsFiddle (https://jsfiddle.quasar.dev) or a Codesandbox (https://codesandbox.quasar.dev) and hit save then copy-paste link here.
https://codepen.io/barnab-s-szabolcs/pen/dyOmeWd
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The q-menu appears without scroll, in the displaced location.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
Quasar Version:
@quasar/app Version:
Quasar mode:
[ x ] SPA
[ ] SSR
[ ] PWA
[ ] Electron
[ ] Cordova
[ ] Capacitor
[ ] BEX
Tested on:
[ x ] SPA
[ ] SSR
[ ] PWA
[ ] Electron
[ ] Cordova
[ ] Capacitor
[ ] BEX
OS: macOS High Sierra 10.13.6 (17G65)
Node: v14.4.0
NPM: 6.14.4
Yarn: 1.21.1
Browsers: Firefox (Interestingly in Chrome the scrollbar first appears then the q-menu resizes itself and the scrollbar disappears)
iOS:
Android:
Electron:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: