Composer quick search see more results
-
In the composer, while writting the title of the topic, you get like a dropdown quick search of topics with the same title
if you have a lot of resulst, in that dropdown you can see a link to "see more resulsts". This link loads the Search page with the string of the title, that's perfect; but the composer popup/modal is still open at the top of the search page, so you actually don't see that the page has changed. Is this a bug or a feature?
I can see this problem in this same https://community.nodebb.org/ install. Anyway I can close the modal/popup after you get redirected to the search page so the user can see the search page?
Same thing happens if you click on any of the resulsts of that dropdown quick search of topics.
-
@sebastián-cisneros Im not sure if this is the right way (probably not) but it seems to be working. Please correct me if im wrong.
$(document).ready(function() { $(window).on('action:ajaxify.end', function(ev, data) { if ($('html').hasClass('composing')) { var $cancelComposer = $('#taskbar .taskbar-composer a'); $cancelComposer.trigger( "click" ); } }); });
basically on action:ajaxify.end , this is after you loaded the new page (search or topic detail page), you trigger the taskbar-composer button that hiddes the composer.
-
That should work but I added a helper to make this easier. https://github.com/NodeBB/nodebb-plugin-composer-default/commit/7c15eeb85b6d702e0a4a3f6519e03af0208c3342
You can all this from your hook
$(document).ready(function() { $(window).on('action:ajaxify.end', function(ev, data) { require(['composer'], function(composer) { composer.minimizeActive(); }); }); });