From 879ab8ebdacc1468ed206701c00b60100dbab9e4 Mon Sep 17 00:00:00 2001 From: William Martin Date: Wed, 8 Sep 2021 08:54:01 -0400 Subject: [PATCH] feat(menu): add console error for incorrect usage of contentId (#23871) resolves #23810 --- core/src/components/menu/menu.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/components/menu/menu.tsx b/core/src/components/menu/menu.tsx index 452125a29a..bdb2f8f3ff 100644 --- a/core/src/components/menu/menu.tsx +++ b/core/src/components/menu/menu.tsx @@ -179,6 +179,11 @@ AFTER: console.error('Menu: must have a "content" element to listen for drag events on.'); return; } + + if (this.el.contains(content)) { + console.error(`Menu: "contentId" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`); + } + this.contentEl = content as HTMLElement; // add menu's content classes