IE8 Extension compatibility with regards to event objects

IE8 Extension compatibility with regards to event objects

zyrolastingzyrolasting Posts: 4Questions: 2Answers: 0
edited August 2015 in Free community support

Hi!

Our firm's project wants to use the ColReorder, ColVis, KeyTable and TableTools extensions. Each of these extensions use the preventDefault() function on event objects passed as parameters as opposed to the window.event object used in IE8.

We understand that the project is IE8 compatible, but should we expect that these plugins will have compatibility issues since they do not seem to use the code found at this SO answer? http://stackoverflow.com/a/1000606

Thanks for your help and for the great software!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    edited August 2015 Answer ✓

    These libraries all use jQuery for their events, and jQuery aspects this problem out. If you look in the jQuery code, you will find that it overrides the default event preventDefault function with:

        preventDefault: function() {
            var e = this.originalEvent;
    
            this.isDefaultPrevented = returnTrue;
            if ( !e ) {
                return;
            }
    
            // If preventDefault exists, run it on the original event
            if ( e.preventDefault ) {
                e.preventDefault();
    
            // Support: IE
            // Otherwise set the returnValue property of the original event to false
            } else {
                e.returnValue = false;
            }
        },
    

    Have you tried the software in IE8? They should all run fine.

    Allan

  • zyrolastingzyrolasting Posts: 4Questions: 2Answers: 0

    Yes, but I did not notice the code you cited, so this comes as a relief.

    Thank you so much for the prompt answer!

This discussion has been closed.