Boostrap modal static and keyboard states

Boostrap modal static and keyboard states

FurburgerFurburger Posts: 37Questions: 8Answers: 0

Hi Allan

I notice in Editor-1.5.6/js/editor.bootstrap.js you load the modal with the correct options to make it static and disable the esc

        $(self._dom.content)

            ....

            .appendTo( 'body' )
            .modal( {
                backdrop: "static",
                keyboard: false
            } );

I notice, however, that these don't seem to be in effect, i.e. I can click outside the modal or press the esc button and it closes the modal.

I can't work out why.

I tried to make a JS Bin to show you but I battled to add the necessary bootstrap stuff, but I think it should be easy to replicate.

If you want a link to my test server, give me a shout.

This question has an accepted answers - jump to answer

Answers

  • FurburgerFurburger Posts: 37Questions: 8Answers: 0

    OK. I found the sections in the API on formOptions

    I have set these to and it now displays the behaviour I require

        onBlur: 'none',
        onEsc: 'none'
    
  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    Answer ✓

    This is correct. Editor's Bootstrap integration disables Bootstrap's own esc and background click handling so the Editor API is consistent between the various style libraries. formOptions is exactly the way to control this kind of behaviour in Editor.

    Allan

This discussion has been closed.