Merge pull request #330 from Safelite/feature/CSR-478

CSR-478 Block keyboard input after button click
This commit is contained in:
CarlNation 2022-04-11 10:22:33 -04:00 committed by GitHub
commit 6522c5b6a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -814,6 +814,7 @@ function setupMocks({
damageLocationQuestion.methods.initializeComponent;
wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent;
wrapper.vm.blockKeyDownInputFromKeyboard = baseMixin.methods.blockKeyDownInputFromKeyboard;
return { wrapper, apiPromise };
}

View file

@ -258,6 +258,8 @@ export default {
},
async forwardButtonAction() {
this.blockKeyDownInputFromKeyboard();
store.commit(this.storeMutations.UPDATE_IS_REPAIR, this.isWindshieldRepair);
if (this.isWindshieldRepair){

View file

@ -25,6 +25,11 @@ export default {
return store.dispatch(type, payload);
},
blockKeyDownInputFromKeyboard(){
document.onkeydown = function (e) {
return false;
};
},
savePageDataToStore(page, data){
store.commit(storeMutations.UPDATE_PAGE_DATA, { page: page, data: data });
},