Skip to content

Commit

Permalink
Do not propagate key down events in editors (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasdom authored Jul 19, 2024
1 parent d70aadd commit 298524e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-pumas-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@itwin/presentation-components": patch
---

Disabled property editors from propagating key down events.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ export class NavigationPropertyEditor extends PropertyEditorBase {
return false;
}
// istanbul ignore next
public override get containerStopsKeydownPropagation(): boolean {
return false;
}
// istanbul ignore next
public get reactNode(): React.ReactNode {
return <NavigationPropertyTargetEditor />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ export class NumericPropertyEditorBase extends PropertyEditorBase {
return false;
}

// istanbul ignore next
public override get containerStopsKeydownPropagation(): boolean {
return false;
}

// istanbul ignore next
public override get containerHandlesTab(): boolean {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ export const QuantityEditorName = "presentation-quantity-editor";
* @internal
*/
export class QuantityPropertyEditorBase extends PropertyEditorBase {
// istanbul ignore next
public override get containerStopsKeydownPropagation(): boolean {
return false;
}

// istanbul ignore next
public get reactNode(): React.ReactNode {
return <QuantityPropertyEditor />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const NavigationPropertyTargetSelector = forwardRef<PropertyEditorAttribu
styles={{
control: () => ({}),
container: () => ({}),
menuPortal: (base) => ({ ...base, zIndex: 9999, width }),
menuPortal: (base) => ({ ...base, zIndex: 9999, width, pointerEvents: "auto" }),
menu: (base) => ({ ...base, margin: 0 }),
dropdownIndicator: () => ({}),
}}
Expand Down

0 comments on commit 298524e

Please sign in to comment.