Skip to content

Commit 074e315

Browse files
committed
Code style
1 parent d069d4f commit 074e315

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/renderers/dom/shared/ReactInputSelection.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ function getElementsWithSelections(acc, win) {
5757
var startOffset = selection.anchorOffset;
5858
var endOffset = selection.focusOffset;
5959
if (startNode && startNode.childNodes.length) {
60-
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
61-
element = startNode.childNodes[startOffset];
62-
}
60+
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
61+
element = startNode.childNodes[startOffset];
62+
}
6363
} else {
64-
element = startNode;
65-
}
64+
element = startNode;
65+
}
6666
}
6767
} else if (doc.selection) {
6868
var range = doc.selection.createRange();
@@ -137,8 +137,9 @@ var ReactInputSelection = {
137137
restoreSelection: function(priorSelectionInformation) {
138138
priorSelectionInformation.activeElements.forEach(function(activeElement) {
139139
var element = activeElement.element;
140-
if (isInDocument(element) &&
141-
getActiveElement(element.ownerDocument) !== element) {
140+
if (
141+
isInDocument(element) && getActiveElement(element.ownerDocument) !== element
142+
) {
142143
if (ReactInputSelection.hasSelectionCapabilities(element)) {
143144
ReactInputSelection.setSelection(
144145
element,
@@ -151,8 +152,9 @@ var ReactInputSelection = {
151152

152153
var curFocusedElement = getFocusedElement();
153154
var priorFocusedElement = priorSelectionInformation.focusedElement;
154-
if (curFocusedElement !== priorFocusedElement &&
155-
isInDocument(priorFocusedElement)) {
155+
if (
156+
curFocusedElement !== priorFocusedElement && isInDocument(priorFocusedElement)
157+
) {
156158
focusNodePreservingScroll(priorFocusedElement);
157159
}
158160
},

0 commit comments

Comments
 (0)