Question regarding Keyboard activation

Question regarding Keyboard activation

ShowGroundsShowGrounds Posts: 2Questions: 1Answers: 0

Hi,

We have added two buttons on our datatable editor form. The "Create" button saves and closes the form dialog. "Save And New" button saves and reopens another new form.

We are trying to use Keyboard Activation for these buttons but its not working

            buttons: [
                    { extend: 'create', editor: editor,
                        formButtons: [
                            {
                                label: 'Create',
                                fn: function () {
                                    var that = this;
                                    this.submit( function () {
                                        that.close();
                                    } );
                                },
                            key: {
                                    altKey: true,
                                    key: 's'
                                },
                            }, {
                                label: 'Save and New',
                                fn: function () { this.submit(); this.create(); },
                            key: {
                                    altKey: true,
                                    key: 'c'
                                },

                            }
                        ],
                     },
              ]

Answers

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    While the Buttons library does support keyboard activation for its buttons, Editor does not at this time match that.

    The documentation for the Editor Buttons API options notes that it supports text, className, action and tabIndex.

    Allan

This discussion has been closed.