Fix bug 456172, Ctrl+Enter messes up complete URL that is prefixed with space character. r=gavin

This commit is contained in:
Jesse Ruderman 2008-09-21 17:59:44 -07:00
parent b76b04bc3f
commit 119e0f8d7f

View File

@ -2042,7 +2042,7 @@ function canonizeUrl(aTriggeringEvent, aPostDataRef) {
// Since this function is called from handleURLBarCommand, which receives
// both mouse (from the go button) and keyboard events, we also make sure not
// to do the fixup unless we get a keyboard event, to match user expectations.
if (!/^(www|https?)\b|\/\s*$/i.test(url) &&
if (!/^\s*(www|https?)\b|\/\s*$/i.test(url) &&
(aTriggeringEvent instanceof KeyEvent)) {
#ifdef XP_MACOSX
var accel = aTriggeringEvent.metaKey;