[richfaces-svn-commits] JBoss Rich Faces SVN: r14311 - branches/community/3.3.X/ui/menu-components/src/main/templates/org/richfaces.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon May 25 11:15:47 EDT 2009


Author: Alex.Kolonitsky
Date: 2009-05-25 11:15:45 -0400 (Mon, 25 May 2009)
New Revision: 14311

Modified:
   branches/community/3.3.X/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
ContextMenu: browser context menu is not blocked on menu itself
https://jira.jboss.org/jira/browse/RF-7087


Modified: branches/community/3.3.X/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- branches/community/3.3.X/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx	2009-05-25 14:34:32 UTC (rev 14310)
+++ branches/community/3.3.X/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx	2009-05-25 15:15:45 UTC (rev 14311)
@@ -42,7 +42,8 @@
 	<div id="#{clientId}" 		
 		class="#{menuItemClass}"
 		style="#{menuItemStyle}"
-		onclick="Event.stop(event);">
+		onclick="Event.stop(event);"
+        onContextMenu="false;" >
 		
 	<jsp:scriptlet><![CDATA[
 		} else {
@@ -65,6 +66,7 @@
 		onmouseup="Event.stop(event); #{component.attributes['onmouseup']}"
 		onmousedown="Event.stop(event); #{component.attributes['onmousedown']}"
 		onclick="#{onclick}"
+        onContextMenu="Event.stop(event); return false;"
 	
 		style="#{menuItemStyle}">
 		<f:call name="utils.encodeAttributes">
@@ -78,7 +80,8 @@
 		
 		<span id="#{clientId}:icon" 
 			class="dr-menu-icon rich-menu-item-icon #{iconDisabledClasses} #{component.attributes['iconClass']}"
-			style="#{component.attributes['iconStyle']}">
+			style="#{component.attributes['iconStyle']}" 
+            onContextMenu="Event.stop(event); return false;">
 			
 			<jsp:scriptlet><![CDATA[
 				UIComponent iconFacet = getIconFacet((org.richfaces.component.UIMenuItem) component);			
@@ -99,6 +102,7 @@
 		
 		<span id="#{clientId}:anchor"			
 			class="#{menuItemLabelClass}"
+            onContextMenu="Event.stop(event); return false;"
 			>
 			#{component.attributes['value']}
 			<f:call name="renderChildren" />




More information about the richfaces-svn-commits mailing list