Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Mar 15, 2017
1 parent f8b202d commit e958fa1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/renderers/dom/shared/ReactInputSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ function getElementsWithSelections(acc, win) {
var endOffset = selection.focusOffset;
if (startNode && startNode.childNodes.length) {
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
element = startNode.childNodes[startOffset];
element = startNode.childNodes[startOffset];
}
} else {
element = startNode;
}
element = startNode;
}
}
} else if (doc.selection) {
var range = doc.selection.createRange();
Expand Down Expand Up @@ -134,8 +134,9 @@ var ReactInputSelection = {
restoreSelection: function(priorSelectionInformation) {
priorSelectionInformation.activeElements.forEach(function(activeElement) {
var element = activeElement.element;
if (isInDocument(element) &&
getActiveElement(element.ownerDocument) !== element) {
if (
isInDocument(element) && getActiveElement(element.ownerDocument) !== element
) {
if (ReactInputSelection.hasSelectionCapabilities(element)) {
ReactInputSelection.setSelection(
element,
Expand All @@ -148,8 +149,9 @@ var ReactInputSelection = {

var curFocusedElement = getFocusedElement();
var priorFocusedElement = priorSelectionInformation.focusedElement;
if (curFocusedElement !== priorFocusedElement &&
isInDocument(priorFocusedElement)) {
if (
curFocusedElement !== priorFocusedElement && isInDocument(priorFocusedElement)
) {
focusNodePreservingScroll(priorFocusedElement);
}
},
Expand Down

0 comments on commit e958fa1

Please sign in to comment.