You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/11/28 00:15:27 UTC
svn commit: r1039785 -
/shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
Author: lindner
Date: Sat Nov 27 23:15:26 2010
New Revision: 1039785
URL: http://svn.apache.org/viewvc?rev=1039785&view=rev
Log:
SHINDIG-1476 | Patch from Mat Mannion | Prevent default click events on left/right scrollers in TabSet feature
Modified:
shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
Modified: shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/tabs/tabs.js?rev=1039785&r1=1039784&r2=1039785&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/tabs/tabs.js (original)
+++ shindig/trunk/features/src/main/javascript/features/tabs/tabs.js Sat Nov 27 23:15:26 2010
@@ -428,9 +428,31 @@ gadgets.TabSet.prototype.createTabTable_
var me = this;
leftNav.onclick = function(event) {
me.smoothScroll_(wrapper, -120);
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+ if (event.preventDefault) {
+ event.preventDefault();
+ } else {
+ event.returnValue = false;
+ }
};
rightNav.onclick = function(event) {
me.smoothScroll_(wrapper, 120);
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+ if (event.preventDefault) {
+ event.preventDefault();
+ } else {
+ event.returnValue = false;
+ }
};
// Swap left and right scrolling if direction is RTL.