Skip to content

Commit

Permalink
chore(release): 3.111.1 [skip ci]
Browse files Browse the repository at this point in the history
## [3.111.1](v3.111.0...v3.111.1) (2025-02-11)

### Bug Fixes

* **rte:** cursor should maintain position when the element is focused ([5b590c7](5b590c7))
  • Loading branch information
semantic-release-bot committed Feb 11, 2025
1 parent 5b590c7 commit 502f39c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.111.1](https://github.com/ClearC2/grid-form-builder/compare/v3.111.0...v3.111.1) (2025-02-11)


### Bug Fixes

* **rte:** cursor should maintain position when the element is focused ([5b590c7](https://github.com/ClearC2/grid-form-builder/commit/5b590c77a82231da27762be93806a0fa2f960df0))

# [3.111.0](https://github.com/ClearC2/grid-form-builder/compare/v3.110.1...v3.111.0) (2025-02-11)


Expand Down
7 changes: 5 additions & 2 deletions dist/cjs/Inputs/Richtextarea/Quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ var ReactQuill = /*#__PURE__*/function (_Component) {
var isFocused = _this.props.isFocused;
var value = _this.props.value;
if (!_this.editor || typeof value === 'undefined') return;
var cursor = 0;

if (isFocused) {
cursor = _this.editor.getSelection(true) ? _this.editor.getSelection(true).index : 0;
}

if (typeof value === 'string') {
value = (0, _replaceAll.default)(value).call(value, ' <', '&nbsp;<');
Expand All @@ -172,8 +177,6 @@ var ReactQuill = /*#__PURE__*/function (_Component) {
_this.editor.clipboard.dangerouslyPasteHTML(value);

if (isFocused) {
var cursor = _this.editor.getSelection(true) ? _this.editor.getSelection(true).index : 0;

_this.editor.setSelection(cursor);
} else {
_this.editor.blur();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grid-form-builder",
"version": "3.111.0",
"version": "3.111.1",
"description": "Form Builder built on top of React Grid Layout",
"repository": {
"type": "git",
Expand Down

0 comments on commit 502f39c

Please sign in to comment.