- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2020 12:33 AM
Hi guys
I have an SP modal widget which contain textarea element, in this field the user should have the ability to break-line by press enter key, but in this case the modal is closing.
I see that if I use f12 with debugger is behave OK, also if I add any alert dialog in the controller.
I already try to "catch" the ENTER key event and put 'return false' or use the method
preventDefault()
but nothing help, even the HI supporters not have any good idea.
Can you advise any WA for it?
I know this is not ServiceNow pure issue but I hope you could assist with workaround for this.
Tnx
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2020 03:07 AM
Hi
Please try bellow script it works for me. The problem was with the modal default buttons.
spModal.open({
title: 'Hi',
backdrop: 'static',
keyboard: false,
buttons: ['',''];
});
Or, if you want to keep the buttons
spModal.open({
title: 'Hi',
backdrop: 'static',
keyboard: false,
buttons: [
{label:'Ok', hide: true},
{label:'Cancel', hide: true}
];
});
Please mark my ANSWER as CORRECT and HELPFUL if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2020 03:07 AM
Hi
Please try bellow script it works for me. The problem was with the modal default buttons.
spModal.open({
title: 'Hi',
backdrop: 'static',
keyboard: false,
buttons: ['',''];
});
Or, if you want to keep the buttons
spModal.open({
title: 'Hi',
backdrop: 'static',
keyboard: false,
buttons: [
{label:'Ok', hide: true},
{label:'Cancel', hide: true}
];
});
Please mark my ANSWER as CORRECT and HELPFUL if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2020 06:36 AM
Indeed it fix the issue with the closing modal (tnx for that!) but it seems now the user does not have any ability to press enter key and break-line, as I mentioned this is textarea element for multi lines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2020 06:38 AM
tnx for your response.
Indeed it fix the issue with the closing modal (tnx for that!) but it seems now the user does not have any ability to press enter key and break-line, as I mentioned this is textarea element for multi lines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2020 11:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2020 03:56 AM