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

'tab' key support on Input Number #1518

Closed
nicolecortes opened this issue Sep 7, 2021 · 3 comments
Closed

'tab' key support on Input Number #1518

nicolecortes opened this issue Sep 7, 2021 · 3 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@nicolecortes
Copy link

nicolecortes commented Sep 7, 2021

I am using the vue and primevue versions:
"primevue": "3.1.1",
"vue": "3.0.4"

Editable data table does not work in Mozilla Firefox ** # 1172 **
Previously, this issue was thought to be closed, but has not been resolved. The problem persists when upgrading to the latest version of PrimeVue.

Currently I have a problem to edit a value of an editable table and generate a validation with the data entered in the table row.

Currently the "Click" event executes the "OnCellEdit" method. This method generates the change in the InputNumber component and later calls the "OnCellEditComplete" method and this method generates the change in the dataTable.

On the other hand, when I use the "TAB" event, First the change is generated in the DataTable ("OnCellEditComplete") and then in the InputNumber ("OnCellEdit") as the validation is executed by the method "OnCellEditComplete" it does not work correctly because the "new" number it has not been updated yet and a validation of the "old" number is being generated.

  1. Clic Event
    image

2.- Tab Event
image

Does someone know how to solve this problem ?

@cagataycivici
Copy link
Member

Unable to replicate with the latest PrimeVue. If the issue persists, please try with the latest version available and create a new ticket with our codesandbox template fork so that we can work on it again. Thank you.

@ghost
Copy link

ghost commented Dec 20, 2021

Hello, I'm facing the same issue, even using the latest PrimeVue version, the browser doesn't matter, same happening in Chrome and Firefox.

From what I've seen so far, this issue occurs when using InputNumber component: the value from v-model seems not being updated on a 'tab' event during cell editing.

Using InputText component, as the docs shows, works as expected.

Is there any difference between how these 2 components handle events?

@ghost
Copy link

ghost commented Dec 20, 2021

Okay, I think I've found where's the issue is: the 'tab' key is not in the switch condition: https://github.com/primefaces/primevue/blob/master/src/components/inputnumber/InputNumber.vue#L381

It should be on the same case as 'enter' key, right?

Or didn't you added the 'tab' key by design?

@tugcekucukoglu tugcekucukoglu changed the title Editable Data Table not working in Mozilla Firefox 'tab' key support on Input Number Jun 2, 2022
@tugcekucukoglu tugcekucukoglu added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jun 2, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.13.0 milestone Jun 2, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants