It’s simply incredible that this bug – a literal one-line fix – has been around since the very inception of ChatGPT
While their AI team is obviously out-of-this-world, their web staff is primary school tier. And a bad primary school!
If that worked before, it’s not currently for me. I tried all things (data clear, different browser, zoom in/out, full screen, disable extensions) but this (multi-day) exercise hasn’t resolved it. 75% zoom and no go. Now I’m just tabbing 4 times to hit the send button. ![]()
This is SUPER ANNOYING. I wish they fix it ASAP. Tried clearing the cache as well, nothing works ![]()
I’ve found a solution (kind of). I just could not bear with it. Turns out, pasting a javascript program into the ChatGPT console which presses the submit button, whenever the enter key is pressed, and also creates a new line, whenever you press Shift + Enter.
Here:
(function(){
if(window.__enterSendListener) return console.log(‘Enter/Shift+Enter handler already active’);
function insertNewlineAtCaret(){
const ae = document.activeElement;
if(!ae) return;
// If a textarea or text input
if(ae.tagName === ‘TEXTAREA’ || (ae.tagName === ‘INPUT’ && ae.type === ‘text’)) {
const start = ae.selectionStart, end = ae.selectionEnd;
ae.setRangeText(‘\n’, start, end, ‘end’);
ae.selectionStart = ae.selectionEnd = start + 1;
ae.focus();
return;
}
// For contenteditable (ChatGPT uses a contenteditable div)
const sel = window.getSelection();
if(!sel || !sel.rangeCount) return;
const range = sel.getRangeAt(0);
range.deleteContents();
// Insert a <br> and a zero-width space so caret can land after it
const br = document.createElement('br');
const zwsp = document.createTextNode('\u200B');
range.insertNode(br);
br.parentNode.insertBefore(zwsp, br.nextSibling);
// Move caret after the zwsp
range.setStartAfter(zwsp);
range.setEndAfter(zwsp);
sel.removeAllRanges();
sel.addRange(range);
}
function handler(e){
if(e.key !== ‘Enter’) return;
const submitBtn = document.getElementById(‘composer-submit-button’);
if(e.shiftKey){
e.preventDefault();
insertNewlineAtCaret();
} else {
e.preventDefault();
if(submitBtn) submitBtn.click();
}
}
document.addEventListener(‘keydown’, handler, true);
window.__enterSendListener = handler;
console.log(‘Handler installed — Enter sends, Shift+Enter inserts newline.’);
})();
I copied the submit button’s ID from the inspect tab and pasted it into the console.
However, this has to be done every time you open ChatGPT, and it goes away when you reload the page. So it isn’t completely solved yet, unless you use a userscript with Tampermonkey.
the easiest way I found using ChatGPT itself!
here’s the other simple way that always works, even if the “Add page…” option is missing.
Method 1 — Use Bookmark Manager
-
Press Ctrl + Shift + O → this opens Bookmark Manager.
-
In the top-right corner, click the ⋮ (three-dots) menu → choose Add new bookmark.
-
A small form appears with two boxes:
-
Name:
Enter sends -
URL: paste this line in full:
javascript:(function(){function send(){var btn=document.querySelector(‘button[aria-label*=“Send”],button[title*=“Send”],button[data-testid*=“send”]’);if(btn){btn.click();return true;}return false;}document.addEventListener(‘keydown’,function(e){if(e.key===‘Enter’&&!e.shiftKey){var a=document.activeElement;var isBox=a&&((a.getAttribute&&a.getAttribute(‘contenteditable’)===‘true’)||a.tagName===‘TEXTAREA’||(a.getAttribute&&a.getAttribute(‘role’)===‘textbox’));if(isBox){e.preventDefault();send();}}},true);alert(‘Enter-to-send enabled for this tab.’);})();
-
-
Click Save.
Now you’ll see the bookmark in your list (and on the bar if you keep it there).
Use it
-
Go back to openai.
-
Click your Enter sends bookmark once.
- You’ll see a small alert: “Enter-to-send enabled for this tab.”
-
Type a message and press Enter → it should send immediately.
(Use Shift + Enter for a new line.)
-
Feature Request: Add an option to invert the Return key behavior (Enter = newline, Ctrl+Enter = send).
featureRequest +1:
Please implement:
Settings ==> _someSettingSection ==> “Invert Return key behavior. [ ] “
It’s the solution of the future, not the past.
Ramming JavaScript into browser consoles to fix a basic feature that should already exist is one definition of absurdity.Requiring a browser extension to achieve the goal is another definition. Using macro apps to ping-pong around hotkeys to do it is an astonishing third.
I realize that by now half of humanity is in a state of permanent confusion about whether App X uses return to send, or return to CR. This includes people who have never seen or used a computer.
Since this confusion is hard-wired, we have no alternative but to give people a choice in the matter so they are not constantly sending incomplete prompts to the system.
It’s bad enough that Messages/FBM/WhatsApp kicked this all off by providing us the ability to send embarrassing, incomplete thoughts/d***pics to people non-stop.
OpenAI has a rare opportunity: to smash this trend forever.
We’ve got 38K people reading the welcome post… and 66.9K on “Pressing enter no longer submits.”
That’s the entire industry distilled: people don’t want another AI SDK; we want a sane f—–g text box.
+1 one to everything that @rshangle said. And it’s a good thing that this site reminds people that “these are real people” – you could guess the stream of impolite verbiage I fired at chatgpt when it dumped some tampermonkey nonsense as a “solution”.
More seriously, developers are a good percentage of people who use these things – and they are also exactly the kind of people who would sometime work on a giant desktop monitor and sometimes on a narrow laptop screen. Forcing me to switch a key when moving from one to another is insane. Not to mention the time wasted in figuring out that it’s not the width but rather detecting that I have a touchscreen which makes this difference.
When pressed, chatgpt suggested “Disable touch in Device Manager” but added “Downside: it disables touchscreen input entirely”. I guess that next it will suggest applying a hammer to my touch screen. Surely this will make things nice and consistent.