Overlay menu doesn't disappear sometimes

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
Zardo
Posts: 56
Joined: 29 Jul 2015, 15:41

06 Feb 2023, 10:00

When using the primefaces theme (6.1.0) the overlay menu doesn't disappear sometimes. It only happens since the upgrade to primefaces12 / Babylon 6.1.0.

Here the test case (it can be reproduced every 3-4 times)

Base Page

Code: Select all

<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<h:head>
    <title>Test Menu</title>
</h:head>

<h:body styleClass="login-body logout">
    <h:outputStylesheet name="css/layout-amber.css" library="babylon-layout" />

    <h:form>
        <p:commandLink id="dynaButton" value="Show" icon="pi pi-external-link"/>
        <p:tieredMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:200px">
            <p:submenu label="File" icon="pi pi-fw pi-file">
                <p:submenu label="New" icon="pi pi-fw pi-plus">
                    <p:menuitem value="Bookmark" icon="pi pi-fw pi-bookmark" actionListener="#{infogridHandler.helloDialog}"/>
                    <p:menuitem value="Video" icon="pi pi-fw pi-video"/>
                </p:submenu>
                <p:menuitem value="Delete" icon="pi pi-fw pi-trash"/>
                <p:divider />
                <p:menuitem value="Export" icon="pi pi-fw pi-external-link"/>
            </p:submenu>


        </p:tieredMenu>
    </h:form>

</h:body>

</html>
Dialog page

Code: Select all

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">


<h:head>
    <title>Hello</title>
</h:head>
<h:body styleClass="dark">
    Hello, World!
</h:body>

</html>
CDI Bean

Code: Select all


import org.primefaces.PrimeFaces;

import javax.faces.view.ViewScoped;
import javax.inject.Named;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Named
@ViewScoped
public class DialogHandler implements java.io.Serializable{

  public void showHelloDialog(){

    Map<String, Object> options = new HashMap<String, Object>();
    options.put("modal", true);
    options.put("draggable", true);
    options.put("resizable", true);
    options.put("width",800);
    options.put("height",800);
    options.put("contentWidth", "100%");
    options.put("contentHeight", "100%");
    options.put("includeViewParams",true);
    options.put("closeOnEscape",true);

    Map<String, List<String>> params = new HashMap<String, List<String>>();

    PrimeFaces.current().dialog().openDynamic("helloDialog", options, params);
  }
}

Zardo
Posts: 56
Joined: 29 Jul 2015, 15:41

07 Feb 2023, 23:15

Setting the transitionDuration to none seems to fix the issue

_layout_variables.xhtml:
$transitionDuration:none; //Fix context menu that does not disappear

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Mar 2023, 12:58

We're unable to replicate the issue I'm afraid.

Post Reply

Return to “Babylon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests