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 in p-dialog is not working properly for mobile view #14951

Closed
PotatoDoge opened this issue Mar 6, 2024 · 4 comments
Closed

Dropdown in p-dialog is not working properly for mobile view #14951

PotatoDoge opened this issue Mar 6, 2024 · 4 comments
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@PotatoDoge
Copy link

Describe the bug

My dropdown works fine when using a full screen on a computer's web browser. The issue happens when trying to use this component on a screen size of a mobile phone. Dropdown is inside a p-dialog (modal)

The screenshot's code is copied and pasted from primeng official dropdown documentaiton

Screenshot 2024-03-05 at 8 12 41 p m

Environment

"dependencies": { "@angular/animations": "^17.1.0", "@angular/common": "^17.1.0", "@angular/compiler": "^17.1.0", "@angular/core": "^17.1.0", "@angular/forms": "^17.1.0", "@angular/material": "^17.1.2", "@angular/platform-browser": "^17.1.0", "@angular/platform-browser-dynamic": "^17.1.0", "@angular/router": "^17.1.0", "@fortawesome/angular-fontawesome": "^0.10.0", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.15.4", "font-awesome": "^4.7.0", "lodash": "^4.17.21", "primeflex": "^3.3.1", "primeicons": "^6.0.1", "primeng": "^17.6.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.14.3" }, "devDependencies": { "@angular-devkit/build-angular": "^17.1.3", "@angular/cli": "^17.1.3", "@angular/compiler-cli": "^17.1.0", "@types/jasmine": "~5.1.0", "@types/lodash": "^4.14.202", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "typescript": "~5.3.2" }

Reproducer

No response

Angular version

17|

PrimeNG version

17

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

21.6.1

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Angular component with dropdown in modal
  2. Switch to mobile view and trigger dropdown options

Expected behavior

Screenshot 2024-03-05 at 8 15 51 p m
@PotatoDoge PotatoDoge added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 6, 2024
@PotatoDoge
Copy link
Author

This issue only happens if the dropdown is inside a p-dialog, here is the code that I have:

`<p-dialog header="Task" [(visible)]="newTaskDialogVisible" [modal]="true" [style]="{ width: '50rem' }" [appendTo]="'body'"
[breakpoints]="{ '1199px': '75vw', '575px': '90vw' }" [draggable]="false" (onHide)="closeNewTaskDialog()">

{{ title.value?.length }} / 30
Please ensure that the title is no longer than 30 characters.
<textarea rows="8" cols="25" pInputTextarea formControlName="description" class="w-full" name="description" placeholder="Description"></textarea>
`

@PotatoDoge
Copy link
Author

The same happens with p-autocomplete:

<p-autoComplete [(ngModel)]="selectedMemberEmail" [suggestions]="filteredMembers" (completeMethod)="filterMembers($event)" (onSelect)="onMemberSelect($event)" [style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}" optionLabel="email" placeholder="Email" [appendTo]="'body'" class="autocomplete-width wider-autocomplete-input"> </p-autoComplete>

Screenshot 2024-03-05 at 8 20 49 p m

@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 18, 2024
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Jul 19, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants