Commit Graph

20 Commits

Author SHA1 Message Date
Jess Lin
79b460a0ca [Gutter] Add ::getDomNode method to all 'components' 2015-04-22 07:28:59 -07:00
Antonio Scandurra
0dca5a5fcd Encapsulate state update inside TextEditorPresenter#getState 2015-02-28 09:25:53 +01:00
Michael Bolin
59df42d7c5 Fix a lint warning reported by ./script/grunt lint.
Now it runs without reporting any issues.
2015-02-23 22:53:31 -08:00
Nathan Sobo
8784d48236 Use plain JS object for InputComponent instead of React 2015-02-19 17:14:54 -07:00
Nathan Sobo
0047e3bc2d Perform InputComponent DOM updates manually 2015-02-19 17:14:54 -07:00
Nathan Sobo
52a9a76b2a Use presenter state in InputComponent 2015-02-19 17:14:54 -07:00
Nathan Sobo
eb19989ecd Handle focus at the host element level
Detecting focus and blur at the level of the input is creating problems
when we blur and then immediately refocus. This is simpler.
2014-11-04 16:37:25 -07:00
Nathan Sobo
5d3602d37b Get node once to attach event handlers 2014-11-04 16:37:22 -07:00
Nathan Sobo
2affff30ff Handle events with native handlers to avoid shadow DOM issues with React 2014-11-04 16:37:21 -07:00
Ben Ogle & Nathan Sobo
1c410cbf5a Handle textInput events in EditorComponent instead of on InputComponent
This commit also changes input handling to be more like it was in the
previous editor. We're using textInput rather than input events because
they are emitted *before* characters are inserted, enabling much simpler
detection of characters inserted via the accented-character menu on
OS X.

Previously I avoided this because something about it was causing reflows
in the old editor, but in this editor that doesn't seem to be a problem,
and it's actually faster.
2014-06-11 16:40:46 -06:00
Nathan Sobo
65b1e13b83 Use Atom-specific fork of React allowing selection restoration opt out
This fork of React allows data-react-skip-selection-restoration to be
defined on input elements, skipping costly selection restoration that
occurs when the input element is focused during reconciliation.
2014-05-20 23:05:13 -06:00
Nathan Sobo
6fef8de63e Merge pull request #2284 from pritambaral/react-paste
Ignore paste in react editor, Fixes #2186
2014-05-20 11:50:26 -06:00
Pritam Baral
c7461f476e Ignore paste in react editor, Fixes #2186 2014-05-18 04:17:21 +05:30
Nathan Sobo
8148e4e50d Skip selection restoration on our fork of react 2014-05-16 15:31:14 -06:00
Nathan Sobo
1a56b487a1 Stop propagation of input events to prevent react from doing extra work
React seems to be handling these events when they bubble to the root of
the document. We want to avoid wasting time on this.
2014-04-22 17:09:43 -06:00
Nathan Sobo
66f3f2d883 Add displayName to components 2014-04-22 17:09:42 -06:00
Nathan Sobo
95b24fb933 Position the hidden input on the most recent cursor when in view
We won't position the hidden input out of the scroll view's bounds to
prevent Chromium's autoscrolling behavior.
2014-04-22 17:09:40 -06:00
Nathan Sobo
f60f9b9f4f Add 'is-focused' class to editor when hidden input is focused 2014-04-22 17:09:37 -06:00
Nathan Sobo
e24196c0ef Require React directly rather than via reactionary
Reactionary is just a tiny helper library that can rely on the react
installed by the requiring application instead.
2014-04-22 17:09:36 -06:00
Nathan Sobo
9c2d321327 Break out selection, cursor, and input components 2014-04-22 17:09:02 -06:00