mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
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:
parent
748e6ed55e
commit
7727c620d1
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue