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
Subwindow title area calculations get messed up after maximize/restore #5252
Comments
Originally by twolf2919 Attachment added: |
Originally by proaccountapp Updated prioritization date. |
Originally by @jouni I suspect this is because the top window's shadow element is covering the bottom windows header partially. So it's not related to maximize or restore, just the fact that the a window's shadow can overlap other elements and mouse events are not propagated through the shadow. You did not specify what theme you are using. All current built-in themes have image-based shadows, so they all exhibit this behavior. The upcoming Valo theme won't have this issue, since it uses CSS box-shadow (except in IE8). Possible workarounds:
|
Originally by twolf2919 Replying to Koivuviita:
Hi Jouni, Your possible workaround works on the sample app. I will try it in the application and let you know. Thanks. But I'd still like an explanation for why things work before the maximize and not after. Thanks for all info. P.s. the test app used whatever theme the Vaadin Eclipse plugin creates an app with - reindeer. Our real app uses the same, with some tweaks I found in the Vaadin forums for making the header title area narrower (I don't know why, by default, you guys made that window title area so bizarrely tall - that's another subject :-) |
Originally by @jouni Replying to twolf2919:
Probably works because the bottom window is the top-most (z-index wise) initially, but when you maximize/restore (basically just focus/click) the top window it becomes the top-most, and the top windows shadow is also raised above the bottom window. The z-index ordering works so that the lastly opened window is always top-most, unless you call Window.bringToFront() or Window.focus() from the server (or unless the user clicks some other window to make it the top-most). |
Originally by @jouni One possible fix is to catch events on the shadow element and then retrigger the same event for the underlying element (using elementFromPoint). I don't know in how many browsers that's supported, but it's worth investigating. Are there any other events other than click that should be considered, or is that the most crucial one? Another solutions is to re-implement the shadows using CSS box-shadow for all core themes. That would leave IE8 without a shadow, and would alter the visual end result of pretty much all Vaadin applications, which is not really nice (considering that many have screenshot based TestBench tests also).. |
Originally by @Artur- The approach of capturing events, trying to find the underlying event and retrigger the same event sounds like it could cause lots and lots of headache in the future. If you have an input field below the shadow, what events should you trigger? Click, click+focus, something else? It would make much more sense to convert the old themes to use box-shadow where possible, the same way it has been done in Valo already (i.e. implement #9303). |
Originally by Dmitrii Rogozin Attachment added: |
Originally by Dmitrii Rogozin Attachment added: |
Originally by Dmitrii Rogozin Added screenshots of former and newer version of the shadows for comparison. |
Originally by twolf2919
Our app shows several Windows on a page. We have noticed that after the user maximizes/restores a Window and then moves the cursor to the title area of the Window below, the cursor did not turn into the expected "cross hair". As a matter of fact, only a very small sliver of the title area, when hovered over, resulted in the cursor changing to cross-hairs. This only happens after the maximize/restore - prior to that, placing the cursor anywhere in the title area of the lower window would cause the cursor to change. If the lower window is maximized/restored (it's a little tricky to do that too given that the mouse only responds over a small portion of the maximize button), everything is back to normal.
This bug is pretty annoying as the user sees it as an unresponsive window.
I'm attaching a test case to highlight the problem:
We first noticed this problem in 7.15, but we just tried the latest (7.21) and it's still there.
Imported from https://dev.vaadin.com/ issue #13885
The text was updated successfully, but these errors were encountered: