Skip to content

Commit 2aad37b

Browse files
authored
TPP-849 fix modal initial focus (#325)
* fix initial focus modal * 3.2.31
1 parent a6f5ebc commit 2aad37b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

lib/components/Modal/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const CloseButton = styled(Button)((props) =>
8282
const HeaderContent = styled.div`
8383
display: flex;
8484
align-items: flex-start;
85+
flex-direction: row-reverse;
8586
justify-content: space-between;
8687
width: 100%;
8788
padding-bottom: ${(props) => themeGet("space.r")(props)};
@@ -258,9 +259,6 @@ const Modal = ({
258259
>
259260
{headerContent ? (
260261
<HeaderContent>
261-
<Box mr="xl" width="100%">
262-
{headerContent}
263-
</Box>
264262
<CloseButton
265263
onClick={onClose}
266264
className="modal-close"
@@ -270,6 +268,9 @@ const Modal = ({
270268
>
271269
<Icon icon={["fas", "times"]} color="greyDark" size="lg" />
272270
</CloseButton>
271+
<Box mr="xl" width="100%">
272+
{headerContent}
273+
</Box>
273274
</HeaderContent>
274275
) : (
275276
<CloseButton

lib/components/Popover/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ export default function Popover({
327327
triggerComponent = (
328328
<div
329329
{...triggerProps}
330+
style={{ display: "inline-block" }}
330331
data-testid={`${children?.props?.["data-testid"] || "popover"}-trigger`}
331332
>
332333
{children}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orcs-design-system",
3-
"version": "3.2.30",
3+
"version": "3.2.31",
44
"engines": {
55
"node": "20.12.2"
66
},

0 commit comments

Comments
 (0)