question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SelectOneMenu: Hover effect on select items is not continuous with long item names

See original GitHub issue

Describe the defect If selectOneMenu has a select item whose name is longer than the options box, a scroll bar appears so that the full name can be read by scrolling. When hovering over a select item, the background and text color of the respective item changes (e.g. to blue blackground and white text) but for select items with overlong names, the hover effect does not color the whole background of the select item.

selectOneMenu_UI

Environment:

  • PF Version: 10.0

To Reproduce The error also appears in PrimeFaces Showcase for SelectOneMenu. Steps to reproduce the behavior:

  1. Go to http://www.primefaces.org:8080/showcase/ui/input/oneMenu.xhtml?jfwid=ed6c3
  2. Activate the browser’s developer tools and select the first selectOneMenu.
  3. Change the html code of one of the menu’s select items so that its name is longer than the box (a horizontal scroll bar should appear).
  4. Scroll right and hover over the select item you just changed.
  5. See error. The hover effect only covers a part of the select item’s name.

Expected behavior By hovering over a select item of selectOneMenu the background of the item should be colored completely (e.g. blue).

Example XHTML Note: Check that the width of the options box is smaller than the select item’s name.

<h:form id="frmTest">
  <p:selectOneMenu id="option" style="width: 150px">
        <f:selectItem itemLabel="Select One" itemValue=""/>
        <f:selectItem itemLabel="Short Entry" itemValue="Short Entry"/>
        <f:selectItem itemLabel="Very loooooooooooooooooooooooooooooooooong Entry"
                              itemValue="Very loooooooooooooooooooooooooooooooooong Entry"/>
  </p:selectOneMenu>
</h:form>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
miedrlcommented, Jun 30, 2021

It works with Rain now, thank you.

1reaction
mellowarecommented, Jun 30, 2021

I see it now. But just as a note you didn’t need JS to do this just use the panelStyle attribute…

<p:selectOneMenu id="option" style="width: 150px" panelStyle="width: 200px" >
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix p:selectOneMenu result item lists moves as when ...
The problem is in p:selectOneMenu (primeface 6.2 version). I have tried with attribute PanelStyle="position:fixed;" but this not helped.
Read more >
PrimeFaces 7.0.23, 8.0.12 and 10.0.6 Released
... not visible with ui-state-error (10.0.6); SelectOneMenu: Hover effect on select items is not continuous with long item names (10.0.6) ...
Read more >
USER GUIDE 5.3
Boolean When enabled, autoComplete only accepts input from the selection list. scrollHeight null. Integer. Defines the height of the items viewport. effect.
Read more >
16 Developing Applications Using Web Page Tools
The source editor provides Code Insight for tags, attribute names & values, ... Choose to hide or not hide elements that are not...
Read more >
Ivanti Endpoint Security 8.5 User Guide
Ivanti retains the right to make changes to this document or related product specifications and descriptions, at any time, without notice. Ivanti makes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found