Updates:
        Status: Obsolete

Comment #1 on issue 1649 by kpreid.switchb.org: Link targets are followed unconditionally irrespective of return value from click handler
http://code.google.com/p/google-caja/issues/detail?id=1649

Cannot reproduce.
Tried test framework (r5416) and playground (r5410).
Tried ES5 and ES5/3 mode.
Tried Firefox stable and Chrome Beta.

Here's the test case I wrote in case it is useful later:

+<p class="clickme testcontainer" id="testHandlerFunctionReturn">
+  <!-- https://code.google.com/p/google-caja/issues/detail?id=1649
+ This link should not be followed when the assigned handler returns false
+       -->
+  <a href="http://example.com/#testHandlerFunctionReturn";
+ id="testHandlerFunctionReturn-link">click me testHandlerFunctionReturn</a>
+  <script>
+    document.getElementById('testHandlerFunctionReturn-link').onclick =
+        jsunitCallback(function() {
+      // if we don't navigate away, we're good
+      setTimeout(jsunitCallback(function() {
+        jsunitPass('testHandlerFunctionReturn');
+      }), 500);
+      debugger;
+      return false;
+    }, 'testHandlerFunctionReturn');
+  </script>
+</p>
+<script type="text/javascript">
+  jsunitRegister('testHandlerFunctionReturn',
+                 function testHandlerFunctionReturn() {
+    // handled in above-assigned onclick handler
+  });
+</script>


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to