Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
primeng tooltip not positioning correctly on horizontally scrolling page

I've got a page that, on certain screen widths, requires horizontal scrolling. Towards one end of the page, I've got a dropdown with primeng MenuItem objects, set to display a tooltip. Trouble is, if the dropdown is off the screen by default, and the user scrolls to the right, the tooltip appears where the edge of the screen would be without scrolling (i.e. it appears a bit further to the left, hovering over nothing in particular). This happens regardless of what the appendTo or positionStyle property of the tooltip is set to.

html snippet:

<dropdown #dropdownMenu [options]="dropdownOptions"></dropdown>

typescript snippet:

@ViewChild('dropdownMenu') dropdown: DropdownComponent;
dropdownOptions: MenuItem<Thing>[];

/* Bunch of other code */

this.dropdownOptions = [
  {
    label: "Item the first",
    command: (thing: Thing) => this.doThingWithThing(thing),
    tooltipOptions: {
      tooltipLabel: "This is the first item in the list",
      appendTo: "dropdownMenu", // also tried with this.dropdown, same result
      positionStyle: "relative",
      tooltipPosition: "left"
  },
  {
    label: "Item the second",
    command: (thing: Thing) => this.doOtherThingWithThing(thing),
    tooltipOptions: {
      tooltipLabel: "This is the second item in the list",
      appendTo: "dropdownMenu",
      positionStyle: "relative",
      tooltipPosition: "left"
  },
  // and so on
]

What should I be doing to get the tooltip to appear attached to the dropdown and not hovering off of where the edge of the screen would be if the user hadn't scrolled?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!