I created a Greasemonkey script to enable a pattern that I like to follow.
When inputting data in rows (e.g. todo list app, cells in a spreadsheet, etc) it is nice to be able to quickly hit enter to move to the next row.
This works well in Tada list and Excel. Type in X, return, next.
This breaks down if the field allows larger text and return takes you to a new line for that one field. An example of this is Basecamp.
I use Shift+Return/Enter to force the existing content to be saved, allowing me to follow the normal pattern with the subtle difference of having to know the meta key.
With the simple Quick Save for Basecamp user script I get the ease of use of Tada in Basecamp todo lists.
Submitting the basecamp form via getTheFormElement.submit() wasn’t kicking off the Ajax call nicely (it worked, just caused refresh).
Instead, I simulate a mouseclick on the submit button via the trusty friend:
function simulateClick(node, eventType) { var event = node.ownerDocument.createEvent("MouseEvents"); event.initMouseEvent(eventType, true, // can bubble true, // cancellable window, 1, // clicks 50, 50, // screen coordinates 50, 50, // client coordinates false, false, false, false, // control/alt/shift/meta 0, // button, null); node.dispatchEvent(event); }
February 2nd, 2007 at 11:02 am
Nice, I’ve wanted this for a long time…Should be default behavior in basecamp IMO.