- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2020 05:24 PM
Hello!
We are using the OOB Ticket Conversations widget, but we are displaying it in a modal window when a chat button is pressed on the portal. The biggest issue is when a user would like to enter a new line in the input field using SHIFT+ENTER the modal window closes. The same thing happens when the user press ENTER the comment is saved but the modal window is also closing, which we don't want to happen.
Any idea where can I find and modify the code of spModal to prevent this action to happen?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2020 11:47 PM
Hi David,
On modals you can control Keyboard behaviour (this includes Escape key as well). You can add the option to the Widget instance:
"keyboard": {
"displayValue": false,
"value": false
}
In the modal widget it looks for that option:
Please refer to: https://stackoverflow.com/questions/20702327/angular-modal-backdrop-issue
Let me know if this helped! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2020 11:47 PM
Hi David,
On modals you can control Keyboard behaviour (this includes Escape key as well). You can add the option to the Widget instance:
"keyboard": {
"displayValue": false,
"value": false
}
In the modal widget it looks for that option:
Please refer to: https://stackoverflow.com/questions/20702327/angular-modal-backdrop-issue
Let me know if this helped! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2020 03:01 AM
Hi David,
Did the information help?
If you call the spModal from script. You can add backdrop:'static' in the call like this:
spModal.open({
title: 'Sup?',
backdrop: 'static'
});
This will prevent the closing when clicking outside.
And to add the keyboard not closing:
spModal.open({
title: 'Sup?',
backdrop: 'static',
keyboard: false;
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 11:59 PM
If not, mark answer as Correct to close the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2020 03:06 AM
Hi
Please try bellow script it works for me. The problem was with the modal 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