[richfaces-issues] [JBoss JIRA] Commented: (RF-6730) rich:contextMenu shows in wrong position when used inside scroll div
Alex Peelman (JIRA)
jira-events at lists.jboss.org
Wed Apr 8 04:21:22 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12461176#action_12461176 ]
Alex Peelman commented on RF-6730:
----------------------------------
In some cases, when the scrollbar is long and scrolled all the way to the bottom, the pop up just disappears from the screen.
After fiddling around with firebug I noticed that the top (css element) position of the generated context menu is bigger than my actual document height.
I suggest the following solution :
1) check if the context menu its top + height > document.height
2) subtract the difference from the top and use this as starting position
var correction = element_top + element_height - document.height
if ( correction > 0 ) {
// shift the element at least <correction> pixels up
element.style.top = top - correction;
}
> 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
> 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