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.

InputLabel width is scaled down to 0.75 on focus and white space is unused.

See original GitHub issue

image

<FormControl
  fullWidth
  disabled={this.disableInput()}
  error={this.state.commandError !== ''}
  style={{margin: '6px 0'}}
>
  <InputLabel style={{background: '#eee'}}>
    {this.props.server.getIn(['server', 'availableCommands', this.state.command]) || 'Command'}
  </InputLabel>
  <Select
    fullWidth
    native
    value={this.state.command}
    onChange={this.handleChange('command')}
    inputRef={(input) => this.commandInput = input}
    id={'command'}
    disabled={this.disableInput()}
    error={this.state.commandError !== ''}
  >
    {commandOptions}
  </Select>
</FormControl>

image

The current fix is some extra CSS on :focus to compensate scaled-down width, I think something like this should be added to the lib itself.

image

Tech Version
Material-UI v1.5.0
React 16.4.2
browser Version 68.0.3440.106 (Official Build) (64-bit)

Best wishes from Trafikito 💯

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Aug 17, 2018

@liesislukas If you think we can find a solution that avoids #11287 and #11283 at the same time, I’m all hears.

0reactions
liesislukascommented, Aug 19, 2018

Yep, I know. Please just use the suggested code if it fits and push an update 👍 I’m not familiar with the source code too much so I believe you will be able to push update quicker & better.

Thank you for all the work done with material UI 👍 you and your team deserves all the credit 💯 My pleasure to contribute couple cents.

Read more comments on GitHub >

github_iconTop Results From Across the Web

InputLabel width is scaled down to 0.75 on focus and ... - GitHub
InputLabel width is scaled down to 0.75 on focus and white space is unused. #12553. component: text field. out of scope.
Read more >
Material-UI Core TextField globally set InputLabelProps shrink
Something like this: MuiInputLabel: { outlined: { transform: 'translate(14px, -6px) scale(0.75)' ...
Read more >
How to create fancy jumping text input labels - Bootcamp
It seemingly feels like the input label is jumping. ... The white space placeholder above is a trick to enable fully using CSS...
Read more >
lifesuite.css | Diversified Adjustment Service, Inc.
This is an attempt to collect a debt. Any information will be used for that purpose. This communication is from a debt collector....
Read more >
chrome/browser/resources/md_downloads/vulcanized.html
This code may only be used under the BSD style license found at ... -webkit-justify-content: space-between; ... width: var(--iron-icon-width, 24px);.
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