Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#22054 closed defect (bug) (fixed)

Twenty Twelve: Search button wraps to the next line on a localized install

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: lancewillett's profile lancewillett
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

  1. In Twenty Twelve's functions.php, set $subset = 'cyrillic' on line 123: http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentytwelve/functions.php?rev=22066#L123
    Or download the Russian translation files from GlotPress and set WPLANG to ru_RU in wp-config.php.
  2. The search input will grow bigger, and the button will wrap to the next line (see the screenshot, middle).

This only happens with Open Sans enabled. Without Open Sans, the form looks similar to the one in the English package (see the screenshot, bottom).

Reproduced in Firefox 15, Chrome 22, IE 9. Doesn't happen in Opera 12 or IE 8.

Attachments (4)

22054.png (6.1 KB) - added by SergeyBiryukov 13 years ago.
22054.patch (410 bytes) - added by SergeyBiryukov 13 years ago.
22054.1.diff (443 bytes) - added by obenland 13 years ago.
ru-chrome.png (17.7 KB) - added by lancewillett 13 years ago.

Download all attachments as: .zip

Change History (13)

@SergeyBiryukov
13 years ago

#1 @SergeyBiryukov
13 years ago

Setting a width for the search form input (22054.patch) fixes this in my testing.

#2 @SergeyBiryukov
13 years ago

  • Description modified (diff)

#3 @obenland
13 years ago

This is weird.

When I tried to reproduce the bug, I noticed that the search input field has a line-height of 16px with Open Sans enabled and 12px when it is disabled, making the input field looking smaller than the submit button. I couldn't reproduce your bug though :)

#4 follow-up: @SergeyBiryukov
13 years ago

Apparently Open Sans somehow alters the input width and/or height if it's not set explicitly.

I've consistently reproduced the bug in Firefox and Chrome on Windows XP, Vista, and Windows 7. Could not reproduce on Mac OS X though.

#5 in reply to: ↑ 4 @obenland
13 years ago

Replying to SergeyBiryukov:

Apparently Open Sans somehow alters the input width and/or height if it's not set explicitly.

22054.1.diff should standardize that. I'm not sure it helps with your original bug, though...

@obenland
13 years ago

#6 @lancewillett
13 years ago

Thanks for the report, patches and all the other info. Will test this out a combination of both your patches. The key is to fix it without changing the existing visual display.

#7 @lancewillett
13 years ago

I can't repeat the originally reported bug after setting Russian as the locale in WP and adding the Twenty Twelve language files to my theme install.

I can't think of why a translated install would make the input element be wider. See ru-chrome.png screenshot.

As for the line-height issue, I don't think we need to adjust for that.

#8 @lancewillett
13 years ago

Confirmed via IRC today with SergeyBiryukov it's only happening in Windows. The width addition should fix it without changing display in other browsers and OSs (log).

#9 @lancewillett
13 years ago

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

In [22191]:

Twenty Twelve: set width for search input in widget context, to avoid dropping the submit button to a new line. Occurs in cases of localized installs where the submit text is wider than English, and seen in various Windows browsers. Fixes #22054.

Note: See TracTickets for help on using tickets.