bluerail / twitter-bootstrap-rails-confirm

Confirm dialogs using Twitter Bootstrap
https://bluerail.nl
MIT License
85 stars 34 forks source link

Create "click" event using an event constructor #14

Closed digitalfrost closed 10 years ago

digitalfrost commented 11 years ago

The way the click event was being created is deprecated. An event constructor should be used instead: https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Events/Creating_and_triggering_events

In addition using the event constructor fixes a scrolling bug where clicking the "OK" button in the modal caused a scroll to the top of the page.

rvanlieshout commented 11 years ago

Thanks for your pull request! I'll give it a test run soon and release a new version. Shoudn't we change line 56 for this too? It now checks for something that isn't used.