moved event.preventDefault() inside of if-then structure
Added a line to the changelog for #1760