Skip to content

Commit

Permalink
chore(release): 3.107.2 [skip ci]
Browse files Browse the repository at this point in the history
## [3.107.2](v3.107.1...v3.107.2) (2025-01-13)

### Bug Fixes

* **RTE:** fixes an issue where determining the cursor position would cause the RTE to scroll into view even if the input was not focused ([e92464e](e92464e))
  • Loading branch information
semantic-release-bot committed Jan 13, 2025
1 parent e92464e commit 48d4958
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.107.2](https://github.com/ClearC2/grid-form-builder/compare/v3.107.1...v3.107.2) (2025-01-13)


### Bug Fixes

* **RTE:** fixes an issue where determining the cursor position would cause the RTE to scroll into view even if the input was not focused ([e92464e](https://github.com/ClearC2/grid-form-builder/commit/e92464e3a5d05316e0e032ca525fbabe5cd04beb))

## [3.107.1](https://github.com/ClearC2/grid-form-builder/compare/v3.107.0...v3.107.1) (2025-01-07)


Expand Down
7 changes: 6 additions & 1 deletion dist/cjs/Inputs/Richtextarea/Quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var ReactQuill = /*#__PURE__*/function (_Component) {
name = _this$props.name;
_this.editor = new _quill.default("#".concat(name), {
theme: theme,
scrollingContainer: 'div',
modules: modules
});

Expand Down Expand Up @@ -140,7 +141,11 @@ var ReactQuill = /*#__PURE__*/function (_Component) {
value = _this$props2.value,
isFocused = _this$props2.isFocused;
if (!_this.editor || typeof value === 'undefined') return;
var cursor = _this.editor.getSelection(true) ? _this.editor.getSelection(true).index : 0;
var cursor = 0;

if (isFocused && _this.editor.getSelection(true)) {
cursor = _this.editor.getSelection(true).index; // do not poll the selection if the input is not focused because it will scroll the element into view when you don't want it to - JRA 01/13/25
}

_this.editor.clipboard.dangerouslyPasteHTML(value);

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.107.1",
"version": "3.107.2",
"description": "Form Builder built on top of React Grid Layout",
"repository": {
"type": "git",
Expand Down

0 comments on commit 48d4958

Please sign in to comment.