[richfaces-issues] [JBoss JIRA] Commented: (RF-6730) rich:contextMenu shows in wrong position when used inside scroll div

Tomas Hampl (JIRA) jira-events at lists.jboss.org
Fri Jun 19 07:16:09 EDT 2009


    [ https://jira.jboss.org/jira/browse/RF-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12472953#action_12472953 ] 

Tomas Hampl commented on RF-6730:
---------------------------------

Hi, this works fine for me

 onexpand=" var scrollOffsets = Position.realOffset(this.layer);        
                      this.layer.style.top=parseInt(this.layer.style.top) - parseInt(scrollOffsets[1])+'px';"

my all code: 
 <rich:panel id="panelFolderTree" style="border-top-width:0px; height:573px; overflow:auto; overflow-x:auto;">

 <rich:contextMenu onexpand="
                    var scrollOffsets = Position.realOffset(this.layer);        
                    this.layer.style.top=parseInt(this.layer.style.top) - parseInt(scrollOffsets[1])+'px';"
                    binding="#{appContext.dynamicComponents['folderTreeMenu']}"
                    id="folderTreeMenu" attached="false" submitMode="ajax"/>
 
 <rich:tree id="folderTree"  ....     >
   <rich:recursiveTreeNodesAdaptor ... >
     <rich:treeNode ...> 
     </rich:treeNode>
   </rich:recursiveTreeNodesAdaptor>
  </rich:tree>
</rich:panel>

> rich:contextMenu shows in wrong position when used inside scroll div
> --------------------------------------------------------------------
>
>                 Key: RF-6730
>                 URL: https://jira.jboss.org/jira/browse/RF-6730
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>         Environment: FF3, Ubuntu 8.04, JSF 1.2, JBOSS Seam 2., JBOSS 4.2.3
>            Reporter: Alex Peelman
>            Assignee: Tsikhon Kuprevich
>         Attachments: after-scroll.png, before-scroll.png
>
>
> I have a lot of context menu's placed inside a scrollable div. When the scrollbar is at the top the pop up shows correctly but when I scroll down the pop up moves more towards the bottom. 
> The context menu is created as followed
> <rich:contextMenu  attached="false"
> 				   disableDefaultMenu="false"
> 				   styleClass="left"					   			   
> 				   id="contextMenu"					   					   
> 				   style="z-index:1500"					   
> 				   >		...
> And is summoned by a rich:componentControl onclick event
> <h:panelGrid columns="2">
> 	<h:outputText value="Actions" styleClass="actions" />
> 	<h:graphicImage value="#{root}/img/arrow_down.png" />	
> 	<rich:componentControl event="onclick" for="contextMenu" operation="show"></rich:componentControl>				
> </h:panelGrid>
> I will attach pictures which shows the problem

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list