Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'preventDefault' is null or not an object #235

Closed
levelos opened this issue Aug 9, 2011 · 2 comments
Closed

'preventDefault' is null or not an object #235

levelos opened this issue Aug 9, 2011 · 2 comments
Assignees
Labels
Milestone

Comments

@levelos
Copy link

levelos commented Aug 9, 2011

Getting this error when closing a window in IE8. Problem appears to be with

preventDefault: function(/*Event*/ e) {
  if (e.preventDefault) {
    e.preventDefault();
  } else {
    e.returnValue = false;
  }
}

in DomEvent.js.

@levelos
Copy link
Author

levelos commented Aug 10, 2011

Update on this one. The error is being triggered in _onCloseButtonClick() in PopUp.js, which calls L.DomEvent.stop(),

stop: function(e) {
L.DomEvent.preventDefault(e);
L.DomEvent.preventDefault(e);
},

Both preventDefault and preventDefault are getting returned as undefined when using the minified leaflet.js file.

@mourner
Copy link
Member

mourner commented Aug 10, 2011

Oops, I'll check it out, seems like a trivial bug...

@ghost ghost assigned mourner Aug 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants