WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#30968 closed defect (bug) (fixed)

Title box being partially cropped at the bottom for add/edit post screen on any non-public post type.

Reported by: tyxla Owned by: helen
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: Posts, Post Types Keywords: has-patch commit
Focuses: ui, administration Cc:

Description

When creating or editing any post of a non-public post type, (e.g. when the permalink section below the title is not visible), the post title box gets partially cropped at the bottom. This results in two minor visual issues (i've attached screenshots):

  1. When the title field is not focused, the border bottom is not visible - 1.jpg.
  2. When the title field is focused, the border bottom and the bottom highlight (box shadow) is not visible - 2.jpg.

This issue occurs only in the trunk version, and not in 4.1.

In order to replicate the issue, you can use the code from the Elaborate example of the register_post_type() function in the Codex: http://codex.wordpress.org/Function_Reference/register_post_type#Example . You simply have to change the public to false to make the post type non-public.

Attachments (5)

1.jpg (12.9 KB) - added by tyxla 5 years ago.
Title box when not focused
2.jpg (13.8 KB) - added by tyxla 5 years ago.
Title box when focused
30968.patch (316 bytes) - added by tyxla 5 years ago.
Attaching a fix of the issue. This pushes the title field box 3px to the bottom, so the border and the focus highlight is now visible on all resolutions.
30968-height_fix.diff (354 bytes) - added by jipmoors 5 years ago.
display fix by height/line-height removal
30968.2.diff (238 bytes) - added by valendesigns 5 years ago.

Download all attachments as: .zip

Change History (15)

@tyxla
5 years ago

Title box when not focused

@tyxla
5 years ago

Title box when focused

#1 @tyxla
5 years ago

  • Keywords needs-patch added

@tyxla
5 years ago

Attaching a fix of the issue. This pushes the title field box 3px to the bottom, so the border and the focus highlight is now visible on all resolutions.

#2 @tyxla
5 years ago

  • Keywords has-patch added; needs-patch removed

#3 @SergeyBiryukov
5 years ago

This issue occurs only in the trunk version, and not in 4.1.

Would be good to find the changeset that caused it.

#4 @tyxla
5 years ago

  • Version changed from trunk to 4.0

Actually, after thoroughly testing on fresh installations (without plugins and with the default theme), I discovered that:

  1. This bug appears on 4.0, 4.0.1 and 4.1 as well.
  2. This bug does not appear on 3.9.2, nor 3.9.3.

So it appears that it was introduced in 4.0.

#5 @SergeyBiryukov
5 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added
  • Milestone changed from Awaiting Review to 4.2

#6 @DrewAPicture
5 years ago

  • Keywords commit added

30968.patch fixes it for me.

This ticket was mentioned in Slack in #core by drew. View the logs.


5 years ago

@jipmoors
5 years ago

display fix by height/line-height removal

#8 @jipmoors
5 years ago

It seems to me that the height on the input box (#titlediv #title) is causing this problem. height: 1.7em.

Removed in Chrome + Safari it restores how it should look but Firefox was giving me trouble until I removed the weird line-height: 100% which shouldn't be used like this because it will be at 100% of the font-height, not the container height.
Removing that aswel gives me expected results in all (tested) browsers.

Have to test on other browsers to verify a 100% solution of the problem.

@valendesigns
5 years ago

#9 @valendesigns
5 years ago

Actually the issue appears to have been introduced at 4.0 when margin-bottom: 10px; was removed from the #titlediv. I can't find the exact changeset but have done a fair bit of testing. Another related issue appears to be from changeset 30338 where the #post-body-content was given a relative position via JS and when that bit of code is removed the issue disappears, as well. In my opinion we should just add 3px of bottom margin back to the #titlediv and move on. Patch 30968.2.diff has that style change.

#10 @helen
4 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 32071:

Ensure post title input is not shortened for non-public post types.

props tyxla.
fixes #30968.

Note: See TracTickets for help on using tickets.