ng-bootstrap / ng-bootstrap/ng-bootstrap

[Feature-Request] NgbDropdown: Display dropdown at mouse position

Open
#4,373 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: dropdown type: feature
Dominant language
TypeScript
Stars
8.2k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use the dropdown more like a context menu.
I'm able to open the dropdown on right-click and also hide the dropdown icon, I just need to position the popup next to the position where the user clicked.

Is there anyway right now to reposition the popup based on mouse cursor position?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the NgbDropdown entry point and trace its existing opening and positioning behavior for a right-click context-menu use case. Confirm how the mouse position should be supplied and verify that the dropdown appears beside the click while ordinary dropdown placement remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, bootstrap, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.