@rhc-shared-components/rich-text-editor 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -7
- package/dist/index.modern.js +6 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -196,8 +196,12 @@ var RichTextEditorFormComponent = function RichTextEditorFormComponent(_ref) {
|
|
|
196
196
|
}, [value, maxLength]);
|
|
197
197
|
return React__namespace.createElement(FormGroupContainer, {
|
|
198
198
|
validated: meta.touched && meta.error ? reactCore.ValidatedOptions.error : reactCore.ValidatedOptions["default"],
|
|
199
|
-
onClick: function onClick() {
|
|
200
|
-
|
|
199
|
+
onClick: function onClick(event) {
|
|
200
|
+
var _event$target;
|
|
201
|
+
|
|
202
|
+
// filtering out just the form event
|
|
203
|
+
if ( // @ts-ignore
|
|
204
|
+
event != null && (_event$target = event.target) != null && _event$target.classList.contains('pf-c-form__label-text') && editorRef.current) {
|
|
201
205
|
// @ts-ignore
|
|
202
206
|
editorRef.current.editing.view.focus();
|
|
203
207
|
}
|
|
@@ -213,11 +217,6 @@ var RichTextEditorFormComponent = function RichTextEditorFormComponent(_ref) {
|
|
|
213
217
|
name: rest.name,
|
|
214
218
|
onReady: function onReady(editor) {
|
|
215
219
|
editor.setData(value);
|
|
216
|
-
|
|
217
|
-
if (disabled || isSubmitting) {
|
|
218
|
-
editor.enableReadOnlyMode(name);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
220
|
editorRef.current = editor;
|
|
222
221
|
},
|
|
223
222
|
disabled: disabled || isSubmitting,
|
package/dist/index.modern.js
CHANGED
|
@@ -175,8 +175,12 @@ const RichTextEditorFormComponent = _ref => {
|
|
|
175
175
|
}, [value, maxLength]);
|
|
176
176
|
return React.createElement(FormGroupContainer, {
|
|
177
177
|
validated: meta.touched && meta.error ? ValidatedOptions.error : ValidatedOptions.default,
|
|
178
|
-
onClick:
|
|
179
|
-
|
|
178
|
+
onClick: event => {
|
|
179
|
+
var _event$target;
|
|
180
|
+
|
|
181
|
+
// filtering out just the form event
|
|
182
|
+
if ( // @ts-ignore
|
|
183
|
+
event != null && (_event$target = event.target) != null && _event$target.classList.contains('pf-c-form__label-text') && editorRef.current) {
|
|
180
184
|
// @ts-ignore
|
|
181
185
|
editorRef.current.editing.view.focus();
|
|
182
186
|
}
|
|
@@ -192,11 +196,6 @@ const RichTextEditorFormComponent = _ref => {
|
|
|
192
196
|
name: rest.name,
|
|
193
197
|
onReady: editor => {
|
|
194
198
|
editor.setData(value);
|
|
195
|
-
|
|
196
|
-
if (disabled || isSubmitting) {
|
|
197
|
-
editor.enableReadOnlyMode(name);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
199
|
editorRef.current = editor;
|
|
201
200
|
},
|
|
202
201
|
disabled: disabled || isSubmitting,
|