Ionic-framework: Need to click twice to select item from slide menu in iOS app

Created on 28 Apr 2017  路  6Comments  路  Source: ionic-team/ionic-framework

Ionic version:
Ionic Framework Version: 3.0.1

When I click on item from ionic slide menu, it doesn't work on first click
It works on second and sometimes on third click.
The same application is working fine in android

Current behavior:
Slide menu item's click work on second time or third time

Expected behavior:
It should work on first click in iOS app as well

Related code:
In app.html code

willy.dee

{{p.title}}

</ion-list>

In app.component

export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage:any = SystemIdentifierPage;
loggedInPages: Array<{ title: string, icon: string, component: any }>;

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,
public menu: MenuController) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
this.loggedInPages = [
{ title: 'Home', icon: 'home', component: Home },
{ title: 'Message', icon: 'mail', component: MessagePage },
{ title: 'Entries', icon: 'paper', component: EntriesPage },
{ title: 'Pending Entries', icon: 'document', component: PendingEntriesPage },
{ title: 'Employees', icon: 'people', component: EmployeesPage },
{ title: 'Clients', icon: 'person', component: ClientList },
{ title: 'Search', icon: 'search', component: MySearch },
{ title: 'Logout', icon: 'log-out', component: LoginPage }
];
this.menu.enable(true, 'loggedInMenu');
}

Most helpful comment

It should probably be mentioned more clearly in the documentation, especially on the menu component that adding the tappable attribute fixes this. It's too easy to miss in the docs.

All 6 comments

@Gurjit-ONEBCG For elements that are not clickable there is a delay of 300ms for the click event to file.
You will need to make it as a button and add the ion-item property to it.
Refer to this code:
```html







````
For more info refer to this link: http://ionicframework.com/docs/troubleshooting/#click-delays

Hello @Gurjit-ONEBCG , could you try @chandanch solution and see if that solves the issue for you? Thanks!

Thanks < button > worked in my case.

It should probably be mentioned more clearly in the documentation, especially on the menu component that adding the tappable attribute fixes this. It's too easy to miss in the docs.

Thanks all! @daveshirman ill talk to the docs people about this.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings