[Webkit-unassigned] [Bug 71323] New: Text positioning inside <input> elements is margin+border+padding+1px

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 1 14:29:12 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=71323

           Summary: Text positioning inside <input> elements is
                    margin+border+padding+1px
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andy at intelligroup.eu


If you look at the attached test case, you will see three elements, a <span>, a <button> and an <input type="text">, all styled to look exactly the same.  Using JavaScript and `window.getComputedStyle()`, the styles are copied from the <input> element, which has several styles set via CSS, to the <span> and the <button>.  The result is that all three elements look *almost* exactly the same, with the single exception being the text position in the <input>.  A vertical bar has been positioned at margin+border-width+padding (0+2+4=6px), and you can see that the text inside the <button> and <span> elements is touching the vertical bar, whereas there is a 1px gap between the bar and the <input> element's text.

This is very similar to a bug in Gecko, although theirs affects all inline replaced elements - see https://bugzilla.mozilla.org/show_bug.cgi?id=698887.  In WebKit, this only appears to affect <input> elements.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list