From 4e7aa53e3e4f56253045bc9db0523da2753e7095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 13 Jan 2011 16:48:56 -0500 Subject: [PATCH] Accordion: Use event.preventDefault() instead of return false when handling keydown. --- ui/jquery.ui.accordion.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 8b7c1f3a4..58a506923 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -87,9 +87,7 @@ $.widget( "ui.accordion", { self.headers .attr( "role", "tab" ) - .bind( "keydown.accordion", function( event ) { - return self._keydown( event ); - }) + .bind( "keydown.accordion", $.proxy( self, "_keydown" ) ) .next() .attr( "role", "tabpanel" ); @@ -221,10 +219,8 @@ $.widget( "ui.accordion", { $( event.target ).attr( "tabIndex", -1 ); $( toFocus ).attr( "tabIndex", 0 ); toFocus.focus(); - return false; + event.preventDefault(); } - - return true; }, resize: function() {