Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
timdown committed Aug 17, 2022
1 parent b411cec commit 8aea7eb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/rangy-classapplier.js
Expand Up @@ -10,7 +10,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/
(function(factory, root) {
if (typeof define == "function" && define.amd) {
Expand Down
14 changes: 13 additions & 1 deletion lib/rangy-core.js
Expand Up @@ -5,7 +5,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/

(function(factory, root) {
Expand Down Expand Up @@ -3051,6 +3051,11 @@
sel.rangeCount = 0;
sel.isCollapsed = true;
sel._ranges.length = 0;
updateType(sel);
}

function updateType(sel) {
sel.type = (sel.rangeCount == 0) ? "None" : (selectionIsCollapsed(sel) ? "Caret" : "Range");
}

function getNativeRange(range) {
Expand Down Expand Up @@ -3100,6 +3105,7 @@
updateAnchorAndFocusFromRange(sel, wrappedRange, false);
sel.rangeCount = 1;
sel.isCollapsed = wrappedRange.collapsed;
updateType(sel);
}

function updateControlSelection(sel) {
Expand All @@ -3124,6 +3130,7 @@
}
sel.isCollapsed = sel.rangeCount == 1 && sel._ranges[0].collapsed;
updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], false);
updateType(sel);
}
}
}
Expand Down Expand Up @@ -3193,6 +3200,7 @@
sel.win = sel.anchorNode = sel.focusNode = sel._ranges = null;
sel.rangeCount = sel.anchorOffset = sel.focusOffset = 0;
sel.detached = true;
updateType(sel);
}

var cachedRangySelections = [];
Expand Down Expand Up @@ -3319,6 +3327,7 @@
this._ranges[this.rangeCount - 1] = range;
updateAnchorAndFocusFromRange(this, range, selectionIsBackward(this.nativeSelection));
this.isCollapsed = selectionIsCollapsed(this);
updateType(this);
} else {
// The range was not added successfully. The simplest thing is to refresh
this.refresh();
Expand Down Expand Up @@ -3387,6 +3396,7 @@
this.rangeCount = 1;
this.isCollapsed = this._ranges[0].collapsed;
updateAnchorAndFocusFromRange(this, range, false);
updateType(this);
}
};

Expand Down Expand Up @@ -3445,6 +3455,7 @@
}
updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], selectionIsBackward(sel.nativeSelection));
sel.isCollapsed = selectionIsCollapsed(sel);
updateType(sel);
} else {
updateEmptySelection(sel);
}
Expand All @@ -3459,6 +3470,7 @@
sel.rangeCount = 1;
updateAnchorAndFocusFromNativeSelection(sel);
sel.isCollapsed = selectionIsCollapsed(sel);
updateType(sel);
} else {
updateEmptySelection(sel);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rangy-highlighter.js
Expand Up @@ -7,7 +7,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/
(function(factory, root) {
if (typeof define == "function" && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion lib/rangy-selectionsaverestore.js
Expand Up @@ -10,7 +10,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/
(function(factory, root) {
if (typeof define == "function" && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion lib/rangy-serializer.js
Expand Up @@ -11,7 +11,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/
(function(factory, root) {
if (typeof define == "function" && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion lib/rangy-textrange.js
Expand Up @@ -27,7 +27,7 @@
* Copyright 2022, Tim Down
* Licensed under the MIT license.
* Version: 1.3.1
* Build date: 16 August 2022
* Build date: 17 August 2022
*/

/**
Expand Down

0 comments on commit 8aea7eb

Please sign in to comment.