Mailspring/internal_packages/composer/spec
Ben Gotow 1d19533fd8 fix(focus): Minor changes to composer focus logic to focus new drafts
Summary:
Remove FocusTrackingRegion—all CommandRegions should be focusable, and nesting the two creates varying behavior based on which is the parent

Calling focus() on an injected / unsafe component should always do /something/. Try the inner React method, inner DOM method, or call on ourselves

Rename contentEditable._focusEditor to "focus" since it intends to replace default focus behavior

In ComposerView, always change focus via setState, never by calling focus() directly. Rather than tracking `_lastFocusedField`, just focus whenever the activeElement isnt within the focusedField. Make body initial focus when draft is pristine...

...(ensures new drafts are focused)

Test Plan: Run tests

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D2406
2016-01-05 11:34:26 -08:00
..
collapsed-participants-spec.cjsx feat(composer): participants collapse 2015-09-14 10:37:00 -04:00
composer-view-spec.cjsx fix(focus): Minor changes to composer focus logic to focus new drafts 2016-01-05 11:34:26 -08:00
expanded-participants-spec.cjsx fix(composer): Change state.focusedField when clicking fields—see details 2015-12-08 17:44:20 -08:00
participants-text-field-spec.cjsx fix(spec): Participant tests breaking on Travis 2015-12-30 18:09:16 -08:00
quoted-text-spec.cjsx feat(editor-region): Add support to register components as editors 2015-12-18 11:06:44 -08:00