• Resolved krzd7

    (@krzd7)


    The term filter list works great, but it won’t close on mobile after selecting an option from the suspending list/menu.

    Can you take a look?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor codersantosh

    (@codersantosh)

    Hello @krzd7,

    Thank you for the suggestion. We have the plan to add functionality if click outside the flex menu, it will be closed. Similar to the Advanced Post Module Demo. We may not add the exact feature suggested by you, but you can try following code.

     $(document).on('click', '.flexMenu-popup a', function() {
                        $('li.flexMenu-viewMore > a').trigger('click');
                    })

    Best Regards!

    Thread Starter krzd7

    (@krzd7)

    Close by clicking outside the menu would be great.

    Your code/suggestion works just fine, thanks a lot.

    Plugin Contributor codersantosh

    (@codersantosh)

    Most welcome!
    Marking as resolved ??

    Thread Starter krzd7

    (@krzd7)

    I ended up implementing your idea of closing when clicking outside the flex menu, in case you want to add for the next update.

    In fact, you’ll see that I’ve combined both ideas but commented the conditional that would close when clicking the link itself.

    $(document).on('click', function(e) {
      var flexMenuPopup = $('ul.flexMenu-popup');
    
      if (!flexMenuPopup || !flexMenuPopup.is(":visible")) return;
    
      var target = $(e.target);
    
      if (!target /*|| target.parents('li.gutentor-filter-item').length*/ || !target.parents('ul.gutentor-filter-list').length) {
            flexMenuPopup.hide();
      }
    });
    Plugin Contributor codersantosh

    (@codersantosh)

    @krzd7 thanks for the code, we added this code, I think result is the same

    gDocument.click(function(e){
        if( $(e.target).closest('li.flexMenu-viewMore ').length > 0 ) {
            return false;
        }
        $('li.flexMenu-viewMore > a').trigger('click');
    });
    Thread Starter krzd7

    (@krzd7)

    Hi,

    I have tested this and, except for the sanity checks, it behaves the same. It triggers the click even if the flex menu is not open at all, but it does not seem to matter that much.

    Thanks for adding this, I’ll remove my custom js once you guys update ??

    Plugin Contributor codersantosh

    (@codersantosh)

    Hello @krzd7 ,

    Please update the Gutentor plugin to the latest version, now flex menu should close when click outside of it.

    Best Regards!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Post Module Header – Term Filter’ is closed to new replies.