fix(composer): Do not steal focus when it is in other components

This is to fix a bug where changing the "from" address to an address with a different signature caused the composer to become focused, hiding the from field.
This commit is contained in:
Ben Gotow 2016-04-06 13:14:03 -07:00
parent 748e6ed55e
commit 7727c620d1

View file

@ -552,8 +552,6 @@ class Contenteditable extends React.Component
# 2. A sister-component that used to have the selection was unmounted
# causing the selection to be null or the document
_shouldRestoreSelectionOnUpdate: ->
(not @innerState.dragging) and
(document.activeElement is @_editableNode() or
not @_editableNode().parentNode.contains(document.activeElement))
!@innerState.dragging and document.activeElement is @_editableNode()
module.exports = Contenteditable