carbon-react 128.4.0 → 128.4.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.
@@ -192,12 +192,12 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
192
192
  };
193
193
  const handleEditorFocus = useCallback(focusValue => {
194
194
  moveCursor.current = true;
195
- setIsFocused(focusValue);
196
- if (!isFocused && focusValue && typeof editor === "object" && editor.current !== document.activeElement) {
195
+ if (focusValue && typeof editor === "object" && editor.current !== document.activeElement) {
197
196
  editor.current?.focus();
198
197
  setFocusToolbar(false);
199
198
  }
200
- }, [editor, isFocused]);
199
+ setIsFocused(focusValue);
200
+ }, [editor]);
201
201
  const handleInlineStyleChange = (ev, style) => {
202
202
  ev.preventDefault();
203
203
  setActiveInlines({
@@ -201,12 +201,12 @@ const TextEditor = exports.TextEditor = /*#__PURE__*/_react.default.forwardRef((
201
201
  };
202
202
  const handleEditorFocus = (0, _react.useCallback)(focusValue => {
203
203
  moveCursor.current = true;
204
- setIsFocused(focusValue);
205
- if (!isFocused && focusValue && typeof editor === "object" && editor.current !== document.activeElement) {
204
+ if (focusValue && typeof editor === "object" && editor.current !== document.activeElement) {
206
205
  editor.current?.focus();
207
206
  setFocusToolbar(false);
208
207
  }
209
- }, [editor, isFocused]);
208
+ setIsFocused(focusValue);
209
+ }, [editor]);
210
210
  const handleInlineStyleChange = (ev, style) => {
211
211
  ev.preventDefault();
212
212
  setActiveInlines({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "128.4.0",
3
+ "version": "128.4.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",