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

parentMentio is undefined when mentio-menu is used #220

Open
ghost opened this issue Oct 28, 2020 · 0 comments
Open

parentMentio is undefined when mentio-menu is used #220

ghost opened this issue Oct 28, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 28, 2020

I am integrating the mentio UI on a feed.

<textarea autogrow mentio mentio-id="'comment' + fl.feedId" mentio-search="search(term)" mentio-items="people" id="bcomment-{{fl.feedId}}" style="resize: none; box-sizing: content-box;" rows="1" ng-model="fl.comments.text" class="vc_textarea" maxlength="400" onkeypress="commentfree(event,this)" ng-change="togglePostCommentBtn(fl.comments.text);" placeholder="<?php echo Yii::t('rewards', 'rewards.add_comment'); ?>"></textarea>

       ` <mentio-menu
                mentio-for="'comment' + fl.feedId"
                mentio-trigger-char="'@'"
                mentio-items="people"
                mentio-template-url="/people-mentions.tpl"
                mentio-search="search(term)"
                mentio-select="getPeopleText(item)"
        ></mentio-menu>
        <script type="text/ng-template" id="/people-mentions.tpl">
            <ul class="list-group user-search">
                <li mentio-menu-item="item" ng-repeat="item in people" class="list-group-item">
                    <span class="text-primary" ng-bind-html="item.name | mentioHighlight:typedTerm:'menu-highlighted' | unsafe"></span>
                </li>
            </ul>
        </script>`

It is showing the following error now:

angular.js:15635 TypeError: Cannot read property '$on' of undefined at Object.link (mentio.js:240) at angular.js:1391 at angular.js:11328 at Ca (angular.js:11334) at p (angular.js:10653) at angular.js:10999 at angular.js:18013 at m.$digest (angular.js:19180) at m.$apply (angular.js:19568) at HTMLLIElement.<anonymous> (angular.js:29023) "<mentio-menu mentio-search="bridgeSearch(term)" mentio-select="bridgeSelect(item)" mentio-items="items" mentio-trigger-char="'@'" mentio-parent-scope="parentScope" class="ng-scope ng-isolate-scope">" (anonymous) @ angular.js:15635 (anonymous) @ angular.js:11914 Ca @ angular.js:11336 p @ angular.js:10653 (anonymous) @ angular.js:10999 (anonymous) @ angular.js:18013 $digest @ angular.js:19180 $apply @ angular.js:19568 (anonymous) @ angular.js:29023 dispatch @ jquery-3.5.1.min.js:2 v.handle @ jquery-3.5.1.min.js:2

angular.js:15635 TypeError: o.hideMenu is not a function at mentio.js:234 at m.$digest (angular.js:19208) at m.$apply (angular.js:19568) at HTMLLIElement.<anonymous> (angular.js:29023) at HTMLLIElement.dispatch (jquery-3.5.1.min.js:2) at HTMLLIElement.v.handle (jquery-3.5.1.min.js:2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants