#47329 closed defect (bug) (fixed)
Overflowing code element on mobile
Reported by: | david.binda | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | ui, administration | Cc: |
Description
Similarly to the responsibility issues reported in #28161 , there seems to be an issue with overflowing of a code
element in a table on mobile devices - specifically Webkit based ones (Chrome, Safari), but also in Firefox, yet only in an edge (described below).
The issue is reproducible on a vanilla WordPress install on the permalinks administration page even in a responsive development mode in Chrome.
The current CSS style - word-wrap: break-word;
feels to be only properly working in Firefox now (at least in my testing), but only up to a point, where there is some really long word (see attached screenshot).
Playing around with multiple options, it looks like following combination fixes the issue across the board:
@media screen and (max-width: 782px) { code { word-wrap: break-word; word-wrap: anywhere; /* Firefox. Allow breaking long words anywhere */ word-break: break-word; /* Webkit: Treated similarly to word-wrap: break-word */ } }
I've tested both, the current issue and proposed patch, in Chrome, Safari, Firefox on both desktop and mobile and it seems to do the trick when improving the display.
Attachments (3)
Change History (15)
#1
@
6 years ago
- Milestone changed from Awaiting Review to 5.3
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#3
@
6 years ago
- Keywords has-patch added
I tested attached patch successfully without any error in Ubuntu 18.04.2 LTS with Google Chrome Version 74.0.3729.157 and Firefox Version 66.0.5
This ticket was mentioned in Slack in #core by marybaum. View the logs.
6 years ago
#7
@
6 years ago
Hi, @SergeyBiryukov
At bugscrub consensus seemed to be that this is ready to commit for 5.2.2 -- do you have time to do that before Thursday?
Related: #41559