mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
8e77c05c0664a8d075f2854d21dfddf3c937f117
The editor has a tabindex of -1 so it can receive focus. This makes it behave like a focusable element such as a textarea. But in reality, when the editor receives focus, it just focuses the hidden input that it watches for textInput events. So when you click, focus is stolen away from the hidden input and goes to the editor. But then the editor sends focus back to the hidden input. Because the input was at the top of the screen, WebKit would scroll up to bring it on screen when focused. So now I just bring the hidden input on screen (by positioning it even with scrollTop) before focusing it. That prevents the WebKit from scrolling.
Atom — Futuristic Text Editing
Informative Links
Ace
- https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode
- https://github.com/ajaxorg/ace/blob/master/lib/ace/selection.js
- https://github.com/ajaxorg/ace/blob/master/lib/ace/commands/default_commands.js
- https://github.com/ajaxorg/ace/blob/master/lib/ace/document.js
commonjs
- http://ringojs.org/api/master/
- http://wiki.commonjs.org/wiki/Filesystem/A
- https://github.com/280north/narwhal
JSCocoa
- http://parmanoir.com/Taming_JavascriptCore_within_and_without_WebView
- https://github.com/parmanoir/jscocoa/
- http://code.google.com/p/jscocoa/
Cloud9
Description
Languages
JavaScript
88.3%
Less
8.7%
CoffeeScript
2.8%
Shell
0.1%