components icon indicating copy to clipboard operation
components copied to clipboard

nested MdDialog not opening on Safari (Mac and IOS)

Open ghost opened this issue 9 years ago • 4 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The dialog should Open

What is the current behavior?

The dialog doesn't open without error

What are the steps to reproduce?

I don't know if I'm doing something wrong in my code but that code is working on Chrome and Safari

Opening the first dialog in that Component work on all browsers


import { Component, OnInit  } from '@angular/core';
import {NgForm} from '@angular/forms';
import {MdDialog, MdDialogRef} from '@angular/material';
import { SharedService } from '../../../layouts/shared-service';
import { RegistrationService } from '../../../_services/registration.service';
import {Observable} from 'rxjs/Rx';
import {AdminRegistrationComponentAssignDialog} from './admin-registration-assign-dialog.component';

@Component({
  moduleId: module.id,
  selector: 'admin-registration',
  templateUrl: './admin-registration.component.html',
  styleUrls: ['./admin-registration.component.scss']
})
export class AdminRegistrationComponent {
  pageTitle: string = 'Registration Administration';
  
  selectedOption: string;
 
   constructor( private _sharedService: SharedService, private registrationService: RegistrationService,public dialog: MdDialog ) {
    this._sharedService.emitChange(this.pageTitle); 
  }
  ngOnInit() {}

	onSelect({ selected }) {

		
		let dialogRef = this.dialog.open(AdminRegistrationComponentAssignDialog, {width:'600px', data: selected[0]});
			dialogRef.afterClosed().subscribe(result => {
			this.selectedOption = result;

    });
	  }
 
}

Opening the second dialog from the first dialog component doesn't work on Safari


import {Component, Inject} from '@angular/core';
import {MD_DIALOG_DATA,MdDialog, MdDialogRef} from '@angular/material';
import {NgForm, NgModel } from '@angular/forms';
import { CustomersService } from '../../../_services/customers.service';
import {Observable} from 'rxjs/Rx';
import {AdminRegistrationComponentAddEnterpriseDialog} from './admin-registration-addenterprise-dialog.component';
import {AdminRegistrationComponentAddBranchDialog} from './admin-registration-addbranch-dialog.component';

@Component({
  selector: 'admin-registration-assign-dialog',
  templateUrl: './admin-registration-assign-dialog.component.html',
  styleUrls: ['./admin-registration-assign-dialog.component.scss']
})

export class AdminRegistrationComponentAssignDialog {

	
  constructor(@Inject(MD_DIALOG_DATA) public data: any, private customersService: CustomersService,public dialog: MdDialog) { 
	
  }
  
  
  changeEnterprise(event) {
		  let dialogRef = this.dialog.open(AdminRegistrationComponentAddEnterpriseDialog, {width:'600px', data: this.data});		
  }
  
  changeBranch(event) {
	  
		  let dialogRef = this.dialog.open(AdminRegistrationComponentAddBranchDialog, {width:'600px', data: event.value});
	  }
  }
}

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cdk 2.0.0-beta.10 @angular/material 2.0.0-beta.10
@angular/common 4.3.2
typescript 2.4.2

Is there anything else we should know?

ghost avatar Sep 08 '17 03:09 ghost

Closing as a duplicate of https://github.com/angular/material2/issues/6719.

crisbeto avatar Sep 09 '17 09:09 crisbeto

Hi All, Is there any work around I can use for now? setTimeout is the only thing that is working for now, but it needs atleast 1000 interval which is quite a delay on mobile device.

webUIdevelopment avatar Sep 20 '17 19:09 webUIdevelopment

Not yet. We are waiting for the bug #6719 to be resolved.

ghost avatar Sep 20 '17 23:09 ghost

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.