mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Refactor #6317
This commit is contained in:
parent
1e70511ee0
commit
a1f811a3f3
1 changed files with 2 additions and 5 deletions
|
@ -29,6 +29,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { isTouchDevice } from '@primeuix/utils/dom';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import BaseInputOtp from './BaseInputOtp.vue';
|
||||
|
||||
|
@ -71,11 +72,7 @@ export default {
|
|||
|
||||
if (event.inputType === 'deleteContentBackward') {
|
||||
this.moveToPrev(event);
|
||||
} else if (event.inputType === 'insertText' || event.inputType === 'deleteContentForward') {
|
||||
this.moveToNext(event);
|
||||
} else if (event instanceof CustomEvent) {
|
||||
// iOS/macOS one-time-code autocomplete uses CustomEvent vs. InputEvent for each character in the code
|
||||
// If moveToNext is not called, it will continue to append the next value after the first character
|
||||
} else if (event.inputType === 'insertText' || event.inputType === 'deleteContentForward' || (isTouchDevice() && event instanceof CustomEvent)) {
|
||||
this.moveToNext(event);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue