bug: ion-textarea wrap="off" is not working
See original GitHub issueBug Report
I can not do English. This sentence uses Google translation.
Ionic version: [x] 4.4.2
Current behavior:
Line feed will occur even if the attribute of wrap="off"
is added to ion-textarea.
The reason is that white-space: pre-wrap
is set in src/components/textarea/textarea.scss.
Also, even if this white-space: pre-wrap
is deleted, white-space: inherit
is set in ionic.mixins.scss, so the line feed is always Will occur.
If you have wrap="off"
attribute to solve this problem, it would be better to add CSS to set white-space: nowrap
.
I am ready for a pull request to solve this problem. https://github.com/scrpgil/ionic/pull/1
Expected behavior:
If wrap="off"
the text is not broken.
Steps to reproduce:
-
Add the
wrap="off"
attribute to ion-textarea. -
Enter text in ion-textarea that you do not want to break. For example, like ASCII art.
-
Make sure that the line breaks and the display is broken.
line wrap(Current behavior)
It should be displayed as below.
line no wrap(Expected behavior:)
Related code:
<ion-textarea wrap="off"></ion-textarea>
not working text wrap.
Other information:
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.3.8
@angular/cli : 7.3.8
@ionic/angular-toolkit : 1.5.1
System:
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
@brandyscarney I understand! Create a pull request referring to the comments.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.