Make WordPress Core

Opened 12 years ago

Closed 12 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
Priority: normal Milestone: 4.2
Component: Posts, Post Types Version: 4.0
Severity: normal Keywords: has-patch commit
Cc: Focuses: ui, administration

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 12 years ago.
Title box when not focused
2.jpg​ (13.8 KB ) - added by tyxla 12 years ago.
Title box when focused
30968.patch​ (316 bytes ) - added by tyxla 12 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 12 years ago.
display fix by height/line-height removal
30968.2.diff​ (238 bytes ) - added by valendesigns 12 years ago.

Download all attachments as: .zip

Change History (15)

@tyxla
12 years ago

Title box when not focused

@tyxla
12 years ago

Title box when focused

#1 @tyxla
12 years ago

  • Keywords needs-patch added

@tyxla
12 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
12 years ago

  • Keywords has-patch added; needs-patch removed

#3 @SergeyBiryukov
12 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
12 years ago

  • Version trunk → 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
12 years ago

  • Component Administration → Posts, Post Types
  • Focuses administration added
  • Milestone Awaiting Review → 4.2

#6 @DrewAPicture
12 years ago

  • Keywords commit added

30968.patch​ fixes it for me.

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


12 years ago

@jipmoors
12 years ago

display fix by height/line-height removal

#8 @jipmoors
12 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.

#9 @valendesigns
12 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
12 years ago

  • Owner set to helen
  • Resolution → fixed
  • Status new → 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.