Skip to content

Commit 5611a1b

Browse files
committed
Code style
1 parent 3e24144 commit 5611a1b

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
@@ -56,12 +56,12 @@ function getElementsWithSelections(acc, win) {
5656
var startOffset = selection.anchorOffset;
5757
var endOffset = selection.focusOffset;
5858
if (startNode && startNode.childNodes.length) {
59-
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
60-
element = startNode.childNodes[startOffset];
61-
}
59+
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
60+
element = startNode.childNodes[startOffset];
61+
}
6262
} else {
63-
element = startNode;
64-
}
63+
element = startNode;
64+
}
6565
}
6666
} else if (doc.selection) {
6767
var range = doc.selection.createRange();
@@ -134,8 +134,9 @@ var ReactInputSelection = {
134134
restoreSelection: function(priorSelectionInformation) {
135135
priorSelectionInformation.activeElements.forEach(function(activeElement) {
136136
var element = activeElement.element;
137-
if (isInDocument(element) &&
138-
getActiveElement(element.ownerDocument) !== element) {
137+
if (
138+
isInDocument(element) && getActiveElement(element.ownerDocument) !== element
139+
) {
139140
if (ReactInputSelection.hasSelectionCapabilities(element)) {
140141
ReactInputSelection.setSelection(
141142
element,
@@ -148,8 +149,9 @@ var ReactInputSelection = {
148149

149150
var curFocusedElement = getFocusedElement();
150151
var priorFocusedElement = priorSelectionInformation.focusedElement;
151-
if (curFocusedElement !== priorFocusedElement &&
152-
isInDocument(priorFocusedElement)) {
152+
if (
153+
curFocusedElement !== priorFocusedElement && isInDocument(priorFocusedElement)
154+
) {
153155
focusNodePreservingScroll(priorFocusedElement);
154156
}
155157
},

0 commit comments

Comments
 (0)