Uploaded image for project: 'Native Modules'
  1. Native Modules
  2. NM-108

Layered Navigation Dropdown Broken

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Incomplete
    • Security Level: All-users
    • Labels:

      Description

      When using the drop-down list filter style on a filter in layered navigation, the drop-down is unusable, as simply clicking on it to open the drop-down list causes the page to refresh. It's also unusable through the use of the keyboard.

      I believe the problem is with the default theme's blocklayer module, in the blocklayered.js file (themes/default-bootstrap/js/modules/blocklayered/blocklayered.js).

      On line 45, the drop-down is included alongside the checkbox and radio-button handling the click event:

      	$(document).on('click', '#layered_form .select, #layered_form input[type=checkbox], #layered_form input[type=radio]', function(e) {
      
      		reloadContent(true);
      	});
      

      Instead, it should be handled separately with the 'change' event, like so:

      	$(document).on('click', '#layered_form input[type=checkbox], #layered_form input[type=radio]', function(e) {
      		reloadContent(true);
      	});
      	
      	$('body').on('change', '#layered_form .select', function(e) {
      		reloadContent(true);
      	});
      

      The use of $('body') seems necessary as using $(document) fails to work here.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tanelorn Mark Preston
            • Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: