Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown - Display a popup regardless of a device screen dimension #8610

Closed
JaneSjs opened this issue Jul 24, 2024 · 3 comments · Fixed by #8632
Closed

Dropdown - Display a popup regardless of a device screen dimension #8610

JaneSjs opened this issue Jul 24, 2024 · 3 comments · Fixed by #8632
Assignees
Labels
enhancement user issue An issue or bug reported by users
Milestone

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Jul 24, 2024


Depending on a device screen size, a Dropdown is displayed as a regular drop-down (desktop), a popup (tablet), or an overlay /popover on a mobile. Customers ask to display a 'normal' popup on all devices: desktop, tablet, mobile.

@JaneSjs JaneSjs added enhancement user issue An issue or bug reported by users labels Jul 24, 2024
@RomanTsukanov
Copy link
Contributor

RomanTsukanov commented Jul 25, 2024

If I get it right, and we're going to let programmers select the menu type dynamically based on the screen size and/or current question, then here's the API:

survey.onOpenDropdownMenu.add((_, options) => {
  options.menuType: "dropdown" | "popup" | "overlay",
  options.deviceType: "mobile" | "tablet" | "desktop",
  options.hasTouchScreen: boolean,
  options.screenHeight: number,
  options.screenWidth: number,
  options.question: Question
});

@JaneSjs JaneSjs assigned OlgaLarina and unassigned RomanTsukanov Jul 26, 2024
@dk981234
Copy link
Contributor

Probably, isTouchDevice flag should be available in the options

@andrewtelnov
Copy link
Member

andrewtelnov commented Jul 28, 2024

I would add mobile/table/desktop property into the options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement user issue An issue or bug reported by users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants