Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readonly not working on p-inputNumber #10866

Closed
ewuillai opened this issue Nov 19, 2021 · 2 comments
Closed

readonly not working on p-inputNumber #10866

ewuillai opened this issue Nov 19, 2021 · 2 comments
Assignees
Labels
LTS-FIXED-11.4.9 Fixed in PrimeNG LTS 11.4.9 LTS-FIXED-12.2.4 Fixed in PrimeNG LTS 12.2.4 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ewuillai
Copy link

ewuillai commented Nov 19, 2021

I'm submitting a ... (check one with "x")

[X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
When [readonly]="true" on p-inputText, the cursor is no more visible but the value stays modifiable.

Expected behavior
The value should not be modifiable.

Minimal reproduction of the problem with instructions

  1. Open stackblitz on p-inputNumber page (https://www.primefaces.org/primeng/showcase/#/inputnumber), then:
  2. Select app.component.html in the project explorer,
  3. Add following attribute on the first p-inputNumber: [readonly]="true",
  4. Click on the corresponding input field in the demo page,
  5. The cursor does not appear, but the value can be modified.

Please tell us about your environment:

  • Angular version: 12.2.12 (12.0.5 in stackbliz)

  • PrimeNG version: 12.2.2

  • Browser: Chrome / Firefox / Electron 12 (Chromium)

  • Language: TypeScript 4.3.5

@panos-el
Copy link

I have the same problem

@chao813
Copy link

chao813 commented Nov 21, 2021

Could it be that the type attribute (type=number) is missing in the input tag in inputnumber.ts?

<input #input [ngClass]="'p-inputnumber-input'" [ngStyle]="inputStyle" [class]="inputStyleClass" pInputText [value]="formattedValue()" [attr.placeholder]="placeholder" [attr.title]="title" [attr.id]="inputId"

@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 22, 2021
@yigitfindikli yigitfindikli self-assigned this Nov 22, 2021
@yigitfindikli yigitfindikli added this to the 13.0.0-rc.3 milestone Nov 22, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-12.2.4 Fixed in PrimeNG LTS 12.2.4 LTS-FIXED-11.4.9 Fixed in PrimeNG LTS 11.4.9 and removed LTS-PORTABLE labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-11.4.9 Fixed in PrimeNG LTS 11.4.9 LTS-FIXED-12.2.4 Fixed in PrimeNG LTS 12.2.4 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants