JavaBlogs Language Filtering I hate Macs… from 1990
Feb 02

QuickSave in Basecamp: Shift-Return to save and move on

Tech Add comments

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);
}

One Response to “QuickSave in Basecamp: Shift-Return to save and move on”

  1. Rob Sanheim Says:

    Nice, I’ve wanted this for a long time…Should be default behavior in basecamp IMO.

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'ajax'