Skip to content

Commit e2522a8

Browse files
authored
[WC-1759]: fix id clash for widgets with the same name (#462)
2 parents cbb6524 + 629a456 commit e2522a8

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

packages/pluggableWidgets/rich-text-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue with Rich Text widget not working correctly when another Rich Text widget is opened in a popup.
12+
913
## [2.1.3] - 2023-01-31
1014

1115
### Fixed

packages/pluggableWidgets/rich-text-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rich-text-web",
33
"widgetName": "RichText",
4-
"version": "2.1.3",
4+
"version": "2.1.4",
55
"description": "Rich inline or toolbar text editing",
66
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
77
"repository": {

packages/pluggableWidgets/rich-text-web/src/components/RichText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import classNames from "classnames";
66
import { Editor } from "./Editor";
77

88
export function RichText(props: RichTextContainerProps): JSX.Element | null {
9-
const { width: w, height: h, widthUnit, heightUnit, readOnlyStyle, name, id } = props;
9+
const { width: w, height: h, widthUnit, heightUnit, readOnlyStyle, id } = props;
1010
const [element, setElement] = useState<HTMLElement | null>(null);
1111

1212
if (props.stringAttribute.status !== "available") {
@@ -28,7 +28,7 @@ export function RichText(props: RichTextContainerProps): JSX.Element | null {
2828
className={classNames("widget-rich-text", `${readOnly ? `editor-${readOnlyStyle}` : ""}`)}
2929
style={{ width, height }}
3030
>
31-
<div ref={setElement} id={name} />
31+
<div ref={setElement} />
3232
{element ? <Editor element={element} widgetProps={props} /> : null}
3333
</div>
3434
);

packages/pluggableWidgets/rich-text-web/src/components/__tests__/__snapshots__/RichText.spec.tsx.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ exports[`RichText render DOM structure 1`] = `
1111
}
1212
}
1313
>
14-
<div
15-
id="RichText_Div"
16-
/>
14+
<div />
1715
</div>
1816
`;

packages/pluggableWidgets/rich-text-web/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="RichText" version="2.1.3" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="RichText" version="2.1.4" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="RichText.xml" />
66
</widgetFiles>

0 commit comments

Comments
 (0)