question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Input] custom padding alignment issue in IE11

See original GitHub issue

Found a strange issue when trying to use Chakra UI in an app that targets IE11. If you put custom padding on an Input, it will start with the input text aligned to the bottom of the input. Clicking it will then cause it to jump. I think it has something to do with line-height but I haven’t been able to narrow it down exactly.


Demo:

chakra-input-padding-ie11

Here’s the entire code for that:

function App() {
  return (
    <ThemeProvider>
      <CSSReset />
      <Box p={4}>
        <Text mb={4}>Custom padding:</Text>
        <Input autoFocus p={2} />
        <Text my={4}>Default padding:</Text>
        <Input />
      </Box>
    </ThemeProvider>
  );
}

And here it is deployed (make sure to use IE11 - it works fine in other browsers):

https://chakra-ui-issue-206.netlify.com/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
with-heartcommented, May 14, 2020

Such dedication to seeing this resolved!

Sorry for the stale spam. I’ll open a PR soon to prevent this from being tagged again.

0reactions
with-heartcommented, Aug 6, 2020

Sorry Justin! We’re actually going to close this because we’re focusing on the 1.0 future. We haven’t touched pre-1.0 in quite some time and don’t plan on any further releases unless there are vulnerabilities we need to fix.

See https://next.chakra-ui.com/ for more info on 1.0, which will be out asap!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Padding of Text Input in Internet Explorer 11 does not work as ...
The problem with this: The input field has to have 34 pixels (22 input field (line-height) + 5x2 margin + 1x2 border). This...
Read more >
IE 11 issues - Support - Themeco Forum
To fix the custom headline accent issue, add the following code in the Theme Options > CSS: .accent-2 { text-align: left; }. The...
Read more >
15 ways to implement vertical alignment with CSS
Learn 15 ways to implement vertical alignment for text with CSS, such as explicit grid row placement and pseudo-elements on flex containers.
Read more >
::placeholder | CSS-Tricks - CSS-Tricks
:placeholder-shown, being a pseudo-class, has to select an existing element – it selects the input whenever you're in the placeholder-showing ...
Read more >
text-underline-offset - CSS: Cascading Style Sheets | MDN
... if there are child elements with different font sizes or vertical alignment. ... Report problems with this compatibility data on GitHub ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found