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.

Copy-paste using mouse not working

See original GitHub issue

Try to paste something into react-select, using mouse. Many users are trying to do this, because doesn’t know about cmd + v/ctrl + v. This could be fixed by increesing real input width, I guess.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:6
  • Comments:8

github_iconTop GitHub Comments

2reactions
blkdrcommented, Sep 11, 2017

I fixed it with this (using multi={true}):

CSS

.Select-multi-value-wrapper {
  .Select-placeholder {
    display: none;
  }
}
.Select-multi-value-wrapper > .Select-input > input {
  width: 100%;
}

And this on componentDidUpdate where I use the component:

componentDidUpdate() {
  const searchbar             = ReactDOM.findDOMNode(this.refs.nosoytsundere);
  const valueWrapper          = searchbar.getElementsByClassName('Select-multi-value-wrapper')[0];
  const selectInput           = searchbar.getElementsByClassName('Select-input')[0];
  const input                 = searchbar.querySelector('input[role="combobox"]');
  if(!isNull(input)){
    input.placeholder         = "You current placeholder";
    if(!isEmpty(this.state.value)){
      valueWrapper.style.width  = "auto";
      selectInput.style.width   = "auto";
      input.style.width         = "auto";
      input.placeholder         = "";
    }else{
      valueWrapper.style.width  = "100%";
      selectInput.style.width   = "100%";
      input.style.width         = "100%";
    }
  }
}

render () {
  return (
    <Select.Async
      ref='nosoytsundere'
      multi={true} {...});
}

Hope this help someone c:

0reactions
alextaymxcommented, Jul 13, 2021

how to make the input field 100% width

Read more comments on GitHub >

github_iconTop Results From Across the Web

copy paste stopped working with wireless mouse
Is there mouse software installed in Settings > Apps > Apps & Features? Uninstall it to see if the problem stops. This is...
Read more >
How to Fix It When Copy and Paste Isn't Working in Windows ...
One of the most common causes of copy and paste issues on Windows is when an installed application is interfering with the clipboard....
Read more >
How to Fix When Copy-Paste Isn't Working - Alphr
If you're not able to use keyboard shortcuts for copy-paste, try selecting the file/text using your mouse, then select Copy and Paste from...
Read more >
How to Fix Copy and Paste Not Working in Windows
How to Fix Copy and Paste Not Working in Windows · 1. Update Windows · 2. Temporarily Disable Antivirus Software · 3. Run...
Read more >
Fix Copying and Pasting via Mouse Not Working on Excel - Saint
Fix: Copying and Pasting via Mouse Not Working on Microsoft Excel · 1. Restart Your System. · 2. Run VBA Command. · 3....
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