-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Multi-line Post title height is too short on load (intermittent) #6897
Comments
What improvements would you suggest? |
One that doesn't make the title look cut-off 😉 |
It's okay to file an issue without an accompanying solution; we shouldn't make folks feel like they need to both file the issue and present the fix 😄 |
I was able to get this to reproduce but it is intermittent (so probably some kind of race condition). On macOS it helped to throttle down Firefox's Web Content process using AppPolice. I had to load the page about a dozen times in Firefox 61, but eventually it did happen. |
@afercia, is the issue still reproducible? |
@mcsf I still can reproduce it, randomly. I've noticed it's easier to reproduce in Firefox after clearing the browser's cache. It happens also on Windows, randomly. Even when it works correctly, on Windows there's a "jump" when the page loads that is always noticeable and unfortunately seeing a big Windows scrollbar in the title block is not that great: |
Closed #8930 as a duplicate and noting that they tested with: Safari 11.1.2 |
Based on #7255, it seems this can happen in browsers other than Firefox, but it's quite hard to reproduce. I still can't manage it though. |
I tried replicating the problem using Safari 12.0 on macOS 10.13.6 and the height of the title looks normal to me (screenshot). I tested with WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 using Safari 12.0 on macOS 10.13.6. I tried with Unified Toolbar on and off as well as Fullscreen Mode on and off. I'm leaving the |
I used to have it happen frequently in Chrome (Windows), but I haven't seen it in a while. I'm unable to replicate it now using 4.1 or 4.2.0-rc.1. Some bugs fix themselves?! lol |
Noting some testing steps from a duplicate issue at #11580 that look worth trying out:
|
Here's a video showing this issue on Chrome, Edge and IE: https://www.useloom.com/share/63aa55f131de407ca4501c383908ffcf. |
@NewJenk I noticed you used https://frontenberg.tomjn.com/ for testing so I re-tested with that (appears to be running Gutenberg 4.3) using Edge 17 and Chrome 70 on Windows 10 and I found that I could see some clipping of the title appear but I had to bump up the font size in order to see the problem and then I could see it in Edge but not in Chrome and only if the title was long enough to fall to four lines and not three as in your video. (39s) I also re-tested with https://frontenberg.tomjn.com using Safari 12.0 on macOS 10.13.6 and found I could see the title clipped without opening the settings sidebar or changing the zoom level in the browser. If I refresh the page, the problem goes away and doesn't come back unless I completely shut down Safari and then re-open. I spotted some errors in the console but I am not sure if they are related:
|
This bug is related to our |
Hi @youknowriad is there a way to test the npm dependency on a local install? On a clean install of trunk (post-5.3) going to the Privacy Policy page to edit while having the browser half-width of a mac pro laptop I'm able to consistently reproduce. If you click into the input area the height adjusts and upon reload it looks ok... but if you do a hard refresh (Chrome) cmd+shift+r the issue will return. The clean install to reproduce is done as follows using MAMP; Browser size 960w |
No, that's not possible because this dependency is bundled in the JS code. |
@youknowriad I just tried updating
To add to the complexity, manually dispatching window resize event won't help as It seems like a proper fix would involve:
... or maybe we could leverage |
@adamziel Thanks for digging in, no strong preferences there, is there another library that already implement the right handlers maybe? |
Ideally the post title should be a block using RichText or PlainText v2. There's some other issues with the post title that could benefit from this, like paste issues and special handling within writing flow. |
It would be great to get some forward movement here to find a solution so we can get this issue fixed. |
Describe the bug
Couldn't reproduce consistently but sometimes the post title height in Firefox is not correctly calculated, so the post title is not entirely visible.
I guess it has something to do with timings and the speed different browsers load content and execute JS. Worth also checking with other browsers. Regardless, seems the height calculation is not so reliable and some improvements should be considered.
What I often see in Firefox is this:
Them just refreshing the page fixes the title height:
To Reproduce
Tested on a macbook pro and Firefox 60.
Worth also considering what might happen on a less performant machine (where the JS execution is likely slower).
The text was updated successfully, but these errors were encountered: