By default, when users view a record through the Service Portal's ticket page, the ticket conversation widget will submit comments when a user presses enter. The following instructions will allow admins to configure the widget so that pressing enter will trigger a new line break rather than submitting the comment.


  1. Log into your instance as an admin
  2. Find the out of box Service Portal widget "Ticket Conversations"
  3. Clone the widget
  4. In the newly cloned widget, go to the Client Controller section
  5.  Find line 264: 
    if (event.keyCode === 13 && !event.shiftKey) { 

    6. Edit the line to: 
    if (!event.keyCode && !event.shiftKey) {

    7. Save the widget
    8. Replace the "Ticket Conversations" with the newly cloned and edited widget.


Applicable Versions



Browser Compatibility

With the modification above, it isn't possible to enter any characters into the comments field in Firefox.

Please note that Firefox returns 0 for any alphanumeric characters. Therefore, the code doesn't go into the if check and doesn't get run.

The modification works fine in Chrome and IE


Article Information

Last Updated:2019-08-02 21:04:58