We are using an autocomplete feature in a text input field (like a typeahead search field) in a widget's Dialog window. The problem is, when the user pressed the ENTER key, the OK confirmation button will be triggered. It turned out that the behavior is hardcoded in the Dialog plugin. Ideally, when the user pressed the ENTER key, the OK button should not be triggered automatically, especially when there's a suggestions' list showing in the autocomplete field (see attached).
We have a very similar use case/issue to this one (ckeditor.com or stackoverflow.com). This issue has been filed since 2011, againsts the CKEditor 3.x. Is there a cleaner/better solution now in CKEditor 4.x (via API or other mechanisms) for overriding this behavior, aside from patching the source code of Dialog's plugin.js? Any suggestion is highly appreciated. Thanks in advance.
We ended up adjusting the
We ended up adjusting the source codes of both the Dialog and Dialog UI plugins in order for our use case to work as intended. Hopefully, there is a cleaner solution to this, or if there's none, it would be a good idea to incorporate a mechanism for this aspect in the future version of CKEditor.