Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Disable/stop the Enter button from submitting a comment on ServicePortal ticket conversations widget - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Disable/stop the Enter button from submitting a comment on ServicePortal ticket conversations widget
KB0712495

Disable/stop the Enter button from submitting a comment on ServicePortal ticket conversations widget


5385 Views Last updated : Apr 13, 2023 public Copy Permalink
KB Summary by Now Assist

Issue

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.

Release

All

Resolution

  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 416: 
    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.

 

Related Links

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

 

NOTE: Further to this, customisations made to the out-of-box product are not covered by the support so you will need to ensure compatibility with future ServiceNow releases and patches. 


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.