src/components/dialog/dialog.js
function(ev) {
          if (sourceElem === target[0] && ev.target === target[0]) {
            ev.stopPropagation();
            ev.preventDefault();

            smartClose();
          }
        }
function(ev) {
          if (sourceElem === target[0] && ev.target === target[0]) {
            ev.stopPropagation();
            ev.preventDefault();

            smartClose();
          }
        }
function ( ev ) { if ( sourceElem === target [ 0 ] && ev . target === target [ 0 ] ) { ev . stopPropagation ( ) ; ev . preventDefault ( ) ; smartClose ( ) ; } }
We check if our original element and the target is the backdrop because if the original was the backdrop and the target was inside the dialog we don't want to dialog to close.
We check if our original element and the target is the backdrop because if the original was the backdrop and the target was inside the dialog we don t want to dialog to close .