This implements automatic focus management for modal panels using the excellent focus-trap module. Upon being shown, modals will have their first tabbable element automatically focused, and shifting focus with the tab key (or more correctly the core:focus-next command) will be limited to the contents of the modal. If the modal does not have any tabbable elements, focus() will be sent to the panel's root element (if it implements it). I'm happy to update this to *always* calls focus on the panel's root element, but then modal implementers would need to handle that and focus things on their own. I'd argue the tabbable element behavior is more accessible though :) This has the effect of not automatically closing most of Atom's own modals whenever the tab key is pressed, which was an odd nonstandard behavior, IMO. This also automates returning focus to the element that had focus before the modal was shown, something up until now had to be implemented in every modal in Atom. This likely breaks a few contracts for existing Atom packages that create modals, but I've found this doesn't conflict behaviorally with well-behaved modals like the command palette which implement their own focus management (which can be removed if this lands). Released under CC0.
Atom is a hackable text editor for the 21st century, built on Electron, and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.
Visit atom.io to learn more or visit the Atom forum.
Follow @AtomEditor on Twitter for important announcements.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to atom@github.com.
Documentation
If you want to read about using Atom or developing packages in Atom, the Atom Flight Manual is free and available online. You can find the source to the manual in atom/flight-manual.atom.io.
The API reference for developing packages is also documented on Atom.io.
Installing
Prerequisites
macOS
Download the latest Atom release.
Atom will automatically update when a new release is available.
Windows
Download the latest Atom installer. AtomSetup.exe is 32-bit, AtomSetup-x64.exe for 64-bit systems.
Atom will automatically update when a new release is available.
You can also download atom-windows.zip (32-bit) or atom-x64-windows.zip (64-bit) from the releases page.
The .zip version will not automatically update.
Using Chocolatey? Run cinst Atom to install the latest version of Atom.
Debian Linux (Ubuntu)
Atom is only available for 64-bit Linux systems.
- Download
atom-amd64.debfrom the Atom releases page. - Run
sudo dpkg --install atom-amd64.debon the downloaded package. - Launch Atom using the installed
atomcommand.
The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.
Red Hat Linux (Fedora 21 and under, CentOS, Red Hat)
Atom is only available for 64-bit Linux systems.
- Download
atom.x86_64.rpmfrom the Atom releases page. - Run
sudo yum localinstall atom.x86_64.rpmon the downloaded package. - Launch Atom using the installed
atomcommand.
The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.
Fedora 22+
Atom is only available for 64-bit Linux systems.
- Download
atom.x86_64.rpmfrom the Atom releases page. - Run
sudo dnf install ./atom.x86_64.rpmon the downloaded package. - Launch Atom using the installed
atomcommand.
The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.
Archive extraction
An archive is available for people who don't want to install atom as root.
This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, but should be compatible with other Linux distributions.
- Install dependencies (on Ubuntu):
sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils libcap2 - Download
atom-amd64.tar.gzfrom the Atom releases page. - Run
tar xf atom-amd64.tar.gzin the directory where you want to extract the Atom folder. - Launch Atom using the installed
atomcommand from the newly extracted directory.
The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.
Building
License
When using the Atom or other GitHub logos, be sure to follow the GitHub logo guidelines.
