Skip to content

Commit

Permalink
Clicking pencil icon now focuses on popup and fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
robGardiner01 authored and anish-work committed Aug 12, 2024
1 parent c868d33 commit bc56886
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/shared/Buttons/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const IconButton = ({
}: ButtonProps) => {
const btnClasses = clsx(`button-${variant?.toLowerCase()}`, className);
return (
<button {...rest} className={btnClasses} onMouseDown={onClick}>
<button {...rest} className={btnClasses} onClick={onClick}>
{rest.children}
</button>
);
Expand Down
1 change: 0 additions & 1 deletion src/widgets/copilot/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const Header = ({ onEditClick, hideClose = false }: HeaderProps) => {
</p>
<div>
<IconButton
disabled={isEmpty}
variant="text"
className={clsx("gp-4 cr-pointer flex-1")}
onClick={() => onEditClick()}
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/copilot/components/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const CopilotWidget: FC<CopilotWidgetType> = ({ isInline }) => {
const handleEditClick = () => {
cancelApiCall();
flushData();
const shadowRoot = document.getElementById("inline")?.firstElementChild?.shadowRoot;
const shadowRoot = document.getElementById(isInline ? "inline" : "popup")?.firstElementChild?.shadowRoot;
const ele = shadowRoot?.getElementById(CHAT_INPUT_ID);
ele?.focus();
};
Expand Down

0 comments on commit bc56886

Please sign in to comment.