Skip to content

Commit

Permalink
Minor tweak to address #45 + rolled version number
Browse files Browse the repository at this point in the history
  • Loading branch information
codedance committed Jun 22, 2014
1 parent ede975f commit fe2c4c3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Are You Sure? - A light "dirty forms" JQuery Plugin
======
**Version:** 1.7
**Version:** 1.8

*Are-you-sure* (```jquery.are-you-sure.js```) is simple light-weight "dirty
form" JQuery Plugin for modern browsers. It helps prevent users from losing
Expand Down Expand Up @@ -229,6 +229,12 @@ $ npm test
###Release History
**2014-06-22** (1.8) - This is a minor bugfix release:
* Fixed NPE that may occur when using a 'multiple' option field.
* Minor timing tweak to help mitigate bypass issue raised in [#45](https://github.com/codedance/jquery.AreYouSure/issues/45)
* Thanks [apassant](https://github.com/apassant) and [amatenkov](https://github.com/amatenkov) for the contribution.
**2014-05-28** (1.7)
* Fixed multiple warning dialogs that may appear on IE and recent versions of Chrome
Expand Down
2 changes: 1 addition & 1 deletion are-you-sure.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"save-check",
"save-warning"
],
"version": "1.7.0",
"version": "1.8.0",
"author": {
"name": "Chris Dance (codedance) at PaperCut Software",
"url": "https://github.com/codedance"
Expand Down
1 change: 0 additions & 1 deletion ays-beforeunload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* http://jquery.org/license
*
* Author: chris.dance@papercut.com
* Version: 1.7.0
* Date: 19th May 2014
*/
$(function() {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.are-you-sure",
"version": "1.7.0",
"version": "1.8.0",
"homepage": "https://github.com/codedance/jquery.AreYouSure",
"authors": [
"CodeDance <chris.dance@papercut.com>"
Expand Down
16 changes: 9 additions & 7 deletions jquery.are-you-sure.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* http://jquery.org/license
*
* Author: chris.dance@papercut.com
* Version: 1.7.0
* Date: 28th May 2014
* Version: 1.8.0
* Date: 22nd June 2014
*/
(function($) {

Expand Down Expand Up @@ -156,12 +156,14 @@
if ($dirtyForms.length == 0) {
return;
}
// Prevent multiple prompts
if (window.aysHasPrompted) {
return;
// Prevent multiple prompts - seen on Chrome and IE
if (navigator.userAgent.toLowerCase().match(/msie|chrome/)) {
if (window.aysHasPrompted) {
return;
}
window.aysHasPrompted = true;
window.setTimeout(function() {window.aysHasPrompted = false;}, 900);
}
window.aysHasPrompted = true;
window.setTimeout(function() {window.aysHasPrompted = false;}, 1000);
return settings.message;
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Albin Sunnanbo (https://github.com/albinsunnanbo)",
"Marc Sutton <ashre@iname.com> (http://www.codev.co.uk)"
],
"version": "1.7.0",
"version": "1.8.0",
"license": "MIT/GPLv2",
"keywords": [ "dirty", "form", "onbeforeunload", "save", "check" ],
"main": "jquery.are-you-sure.js",
Expand Down

0 comments on commit fe2c4c3

Please sign in to comment.