For many years, the only options for building highly interactive Web components were Java applets and Flash. Although both plugin technologies have much to offer, one of their weakest qualities is browser integration. Event focus and text copy are two cases in point.
Focus, Events, and Applets
ChemWriter is a chemical structure drawing tool, first released as a Java applet, that makes extensive use of keyboard shortcuts to speed the drawing of complex structures. For these shortcuts to work, the applet must be able to capture keyboard and mouse focus.
On many platform/browser/JVM configurations, keyboard and mouse focus capture works quite well. Internet Explorer on Windows is one of these system configurations. Simply hovering the mouse cursor over a ChemWriter instance is enough to capture keyboard focus. On other system configurations, keyboard focus doesn't work well at all. For example, Safari on Mac requires a click inside the editor to begin capturing keyboard events. And for unknown reasons this mechanism periodically fails even on system configurations that generally work well otherwise.
But the issue isn't just limited to keyboard events - it applies to mouse events as well. This means that the only way to begin editing an existing structure without clicking on the drawing area and generating an unwanted drawing element (a not-too-uncommon situation) is to find a 'dead' place on the editor to click (say, one of the scrollbars).
Keyboard/Mouse Focus Now Works Everywhere
Molfile Copy Now Works Everywhere
Another problem area has been copying molfiles from ChemWriter to the system clipboard. Like event focus, this functionality works well on some platforms, but not at all on others. For example, all Mac-based browsers appear to be incapable of copying text from a Java popup to the system clipboard, but this feature works great on Windows.
Try It for Yourself
We've set up a ChemWriter demo site to encourage those who might be interested in trying the most recent development version against the browser of their choice.