Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x bf4a568cb -> b5200985c


WICKET-6067 Provide an Ajax Behavior that prevents form submit on ENTER

Simplify the test and fix its assertion message


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b5200985
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b5200985
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b5200985

Branch: refs/heads/wicket-7.x
Commit: b5200985cf1b435fbec71179f01022b122e7d2f7
Parents: bf4a568
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Sun Jan 10 22:29:11 2016 +0100
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Sun Jan 10 22:29:11 2016 +0100

----------------------------------------------------------------------
 wicket-examples/src/main/webapp/js-test/tests/ajax/form.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/b5200985/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js 
b/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
index 94d4d97..6b79e07 100644
--- a/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
+++ b/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
@@ -92,11 +92,10 @@ $q(document).ready(function() {
                        evt.keyCode = evt.which = 13; // ENTER key
                        var prevented = false;
                        evt.preventDefault = function() {prevented = true;};
-                       evt.isDefaultPrevented = function() {return prevented;};
-                       equal(evt.isDefaultPrevented(), false, "The JS event 
default behavior is not yet prevented!");
+                       equal(prevented, false, "The JS event default behavior 
is not yet prevented!");
 
                        setTimeout(function() {
-                               equal(evt.isDefaultPrevented(), true, "The JS 
event default behavior is not yet prevented!");
+                               equal(prevented, true, "The JS event default 
behavior must be prevented!");
                                start();
                        }, 10);
 

Reply via email to