mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-23 04:27:09 +00:00
[Keyboard Navigation - Cosmos DB Query Copilot - Query Faster with Copilot>Enable Query Advisor]: Keyboard focus order is not logical after selecting the 'Copy code' button. (#2010)
* [accessibility-3560073]: [Keyboard Navigation - Cosmos DB Query Copilot - Query Faster with Copilot>Enable Query Advisor]: Keyboard focus order is not logical after selecting the 'Copy code' button. * [Keyboard Navigation - Cosmos DB Query Copilot - Query Faster with Copilot>Enable Query Advisor]: Keyboard focus order is not logical after selecting the 'Copy code' button. --------- Co-authored-by: Satyapriya Bai <v-satybai@microsoft.com>
This commit is contained in:
parent
642c708e9c
commit
ce88659fca
@ -75,6 +75,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
|
|||||||
const inputEdited = useRef(false);
|
const inputEdited = useRef(false);
|
||||||
const itemRefs = useRef([]);
|
const itemRefs = useRef([]);
|
||||||
const searchInputRef = useRef(null);
|
const searchInputRef = useRef(null);
|
||||||
|
const copyQueryRef = useRef(null);
|
||||||
const {
|
const {
|
||||||
openFeedbackModal,
|
openFeedbackModal,
|
||||||
hideFeedbackModalForLikedQueries,
|
hideFeedbackModalForLikedQueries,
|
||||||
@ -132,6 +133,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
|
|||||||
document.body.removeChild(queryElement);
|
document.body.removeChild(queryElement);
|
||||||
|
|
||||||
setshowCopyPopup(true);
|
setshowCopyPopup(true);
|
||||||
|
copyQueryRef.current.focus();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setshowCopyPopup(false);
|
setshowCopyPopup(false);
|
||||||
}, 6000);
|
}, 6000);
|
||||||
@ -677,6 +679,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
|
|||||||
)}
|
)}
|
||||||
<CommandBarButton
|
<CommandBarButton
|
||||||
className="copyQuery"
|
className="copyQuery"
|
||||||
|
elementRef={copyQueryRef}
|
||||||
onClick={copyGeneratedCode}
|
onClick={copyGeneratedCode}
|
||||||
iconProps={{ iconName: "Copy" }}
|
iconProps={{ iconName: "Copy" }}
|
||||||
style={{ fontSize: 12, transition: "background-color 0.3s ease", height: "100%" }}
|
style={{ fontSize: 12, transition: "background-color 0.3s ease", height: "100%" }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user