Войти с помощью github
Форум /

Почему block: 'opens-a-modal' инициализируется, а block: 'closes-a-modal' нет?

{
                block: 'modal',
                mix: [
                    {
                        block: 'closes-a-modal',
                        js: {id: 'modal-rules'}
                    },
                    {
                        block: 'opens-a-modal',
                        js: {id: 'modal-rules'}
                    }
                ],
                content: {
                    block: 'modal-rules'
                }
            }
BEMDOM.decl(this.name, /**@lends OpensAModal.prototype*/{
            onSetMod: {
                js: {
                    /**
                     * @constructs
                     * @this OpensAModal
                     */
                    inited: function () {
                        var modal = this.findBlockOn('modal');
                        this.findBlockOn('button')
                            .on('click', function () {
                                modal
                                    .setMod('visible', 'true');
                            }, this);
                    }
                }
            }
        }
BEMDOM.decl(this.name, /**@lends ClosesAModal.prototype*/{
            onSetMod: {
                js: {
                    /**
                     * @constructs
                     * @this ClosesAModal
                     */
                    inited: function () {
                        debugger;
                        var modal = this.findBlockOn('modal');
                        this.findBlockOn('button')
                            .on('click', function () {
                                debugger;
                                modal
                                    .delMod('visible');
                            }, this);
                    }
                }
            }
        }