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.

readonly-plain-text with button addon

See original GitHub issue

The readonly plain text doesnt work with button addon.

Live example: https://codepen.io/caiquecastro/pen/eMdmYo

image

<div class="input-group mb-3">
  <div class="input-group-prepend">
    <button class="btn btn-outline-secondary" type="button">Button</button>
  </div>
  <input type="text" readonly class="form-control-plaintext" id="staticEmail" value="email@example.com">
</div>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
mdocommented, Mar 18, 2018

Why not use only the readonly attribute then? If the idea is that at some point a user could interact with that field, I would think it should be a field from the beginning.

1reaction
patrickhlaukecommented, Mar 18, 2018

regardless of the specific use case here, though, i’d say the fix (or something similar to it) seems legit to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input field readonly without making the input-addon button ...
When I make the input field readonly, it automatically makes the button in input-group-addon also readonly. Below is the code:
Read more >
Making a Field Read-only - Gravity Forms Documentation
Sometimes making a field read-only can be useful, allowing you to then utilize that field for dynamic display of various messages.
Read more >
rich text readonly - Laserfiche Answers
Is there a way to make the rich text field read only with javascript? ... But to achieve results similar to setting the...
Read more >
How to browse in Text-Only Mode in Chrome, Edge, or Firefox
How to browse in Text-Only Mode in Firefox · Open the Firefox browser on your PC. · Type about:config and press Enter button....
Read more >
Form controls · Bootstrap v5.0
If you want to have <input readonly> elements in your form styled as plain text, use the .form-control-plaintext class to remove the default...
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