Skip to content

Commit

Permalink
fix: manage focus on popper component's children
Browse files Browse the repository at this point in the history
  • Loading branch information
d-rita committed Jun 29, 2024
1 parent 94f69df commit d14f666
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions collections/forms/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-04-18T04:00:14.144Z\n"
"PO-Revision-Date: 2024-04-18T04:00:14.144Z\n"
"POT-Creation-Date: 2024-06-29T00:31:22.276Z\n"
"PO-Revision-Date: 2024-06-29T00:31:22.276Z\n"

msgid "Upload file"
msgstr "Upload file"
Expand Down
12 changes: 12 additions & 0 deletions components/button/i18n/en.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-29T00:30:36.945Z\n"
"PO-Revision-Date: 2024-06-29T00:30:36.945Z\n"

msgid "Toggle dropdown"
msgstr "Toggle dropdown"
7 changes: 5 additions & 2 deletions components/header-bar/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-03-29T07:26:07.540Z\n"
"PO-Revision-Date: 2024-03-29T07:26:07.540Z\n"
"POT-Creation-Date: 2024-06-29T00:30:42.907Z\n"
"PO-Revision-Date: 2024-06-29T00:30:42.907Z\n"

msgid "Search apps"
msgstr "Search apps"
Expand Down Expand Up @@ -73,3 +73,6 @@ msgstr "New app version available"

msgid "Click to reload"
msgstr "Click to reload"

msgid "header bar profile"
msgstr "header bar profile"
2 changes: 1 addition & 1 deletion components/menu/src/menu/use-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const useMenuNavigation = (children) => {
}
break
case 'ArrowLeft':
case 'Escape':
case 'Escape': //flyout menu
event.preventDefault()
openSubMenus[openSubMenus.length - 1]?.focus()
openSubMenus[openSubMenus.length - 1]?.children[0].click()
Expand Down
3 changes: 2 additions & 1 deletion components/popper/src/popper.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const Popper = ({

useEffect(() => {
if (popperElement) {
popperElement.children?.[0]?.focus() || popperElement.focus()
popperElement.focus()
popperElement?.children?.[0]?.focus()
}
}, [popperElement])

Expand Down

0 comments on commit d14f666

Please sign in to comment.