Skip to content

Commit

Permalink
Remove focus stopPropagation in action items
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Jul 8, 2024
1 parent 95709ea commit 3318b5e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export class Key2ClickDirective implements OnChanges, OnDestroy {
private blur (evt: any) {
doKey2ClickBlur(evt);
}
private focus (evt: any) {
evt.stopPropagation();
}
constructor(private el: ElementRef) {
this.subscribeEventListeners();
}
Expand All @@ -41,7 +38,6 @@ export class Key2ClickDirective implements OnChanges, OnDestroy {
this.element.addEventListener("keyup", this.onkeyup.bind(this));
this.element.addEventListener("keydown", this.onkeydown.bind(this));
this.element.addEventListener("blur", this.blur);
this.element.addEventListener("focus", this.focus);

this.isSubscribed = true;
}
Expand All @@ -52,7 +48,6 @@ export class Key2ClickDirective implements OnChanges, OnDestroy {
this.element.removeEventListener("keyup", this.onkeyup.bind(this));
this.element.removeEventListener("keydown", this.onkeydown.bind(this));
this.element.removeEventListener("blur", this.blur);
this.element.removeEventListener("focus", this.focus);

this.isSubscribed = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
evt.stopPropagation();
}
"
v-on:focus="
(evt) => {
evt.stopPropagation();
}
"
v-bind:disabled="item.disabled"
v-bind:title="item.tooltip || item.title"
v-bind:aria-checked="item.ariaChecked"
Expand Down
1 change: 0 additions & 1 deletion src/knockout/kosurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,5 @@ ko.bindingHandlers["key2click"] = {
};
element.onkeydown = (evt: any) => doKey2ClickDown(evt, options);
element.onblur = (evt: any) => doKey2ClickBlur(evt);
element.onfocus = (evt: any) => evt.stopPropagation();
},
};
1 change: 0 additions & 1 deletion src/react/reactSurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ export function attachKey2click(element: JSX.Element, viewModel?: any, options:
},
onKeyDown: (evt: any) => doKey2ClickDown(evt, options),
onBlur: (evt: any) => doKey2ClickBlur(evt),
onFocus: (evt: any) => evt.stopPropagation()
}
);
}
5 changes: 0 additions & 5 deletions src/vue/components/action-bar/action-bar-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
evt.stopPropagation();
}
"
v-on:focus="
(evt) => {
evt.stopPropagation();
}
"
v-bind:disabled="item.disabled"
v-bind:title="item.tooltip || item.title"
v-bind:aria-checked="item.ariaChecked"
Expand Down

0 comments on commit 3318b5e

Please sign in to comment.