7

On Mac OS X, pressing Option-Return inserts newlines in text input fields instead of e.g. submitting a form. This is a system-wide convention (Cocoa's insertNewlineIgnoringFieldEditor:).

Very few programs, like the Safari web browser, require focus on an input field that doesn't handle Return itself for the form to submit. For these (<textarea>, essentially), both pressing Return and Option-Return work for inserting a line break.


Super User Chat only supports entering multiple lines by pressing Shift-Enter. In all other cases, it hijacks the Return key-down event and submits. This is the relevant piece of code, as far as I can tell:

function(a) {
    var b = !1;
    ka = ka && (38 == a.which || 40 == a.which);
    switch (a.which) {
    case 13:
        !a.shiftKey && !e && (ya(), b = !0);
        break;
        [lines skipped...]
    }
    b && a.preventDefault()
}

From what I can tell, ya() is the submit function call.

Please also allow use of Option-Return for inserting newlines, consistent with OS X platform standards. AFAICT, this will have no adverse effects on other functionality.

!a.shiftKey && !a.altKey && !e && (ya(), b = !0);

I classify this issue as a , since the implementation of the submit button acts different from system-wide basic text editing behavior for all users of OS X used to platform conventions. Opt-Enter never leaves the field editor or submits, except in SE chat.

True, it's a web application and platform independent etc., but how basic must expected functionality be before different becomes wrong?

0

You must log in to answer this question.

Browse other questions tagged .