Skip to content

Commit

Permalink
Add polyfill for event.preventDefault to work with IE8
Browse files Browse the repository at this point in the history
  • Loading branch information
drublic committed Jun 3, 2014
1 parent 86f2c83 commit 85b5097
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Changelog

## HEAD
* Add polyfill for event.preventDefault to work with IE8
* Add plugin to strech a modal to 80% of the screen height

* Prevent scrolling of body on small screens

* Fix jumping of the page on devices with small screens (#32)

* Implement max width for modal via data attribute

* Fix vertical resizing for large pictures
* Fix margins around modal in resize plugin

Expand Down
6 changes: 5 additions & 1 deletion modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,12 @@
// If the hash element exists
if (modalElement) {

// Polyfill to prevent the default behavior of events
event.preventDefault = event.preventDefault || function () {
event.returnValue = false;
};

event.preventDefault();
event.stopPropagation();

// Get first element in selected element
modalChild = modalElement.children[0];
Expand Down

0 comments on commit 85b5097

Please sign in to comment.