Sha256: 00e650ff776318f30dffe755545dd5e4c4ab169ff08526dd6ff957e791beba3b

Contents?: true

Size: 426 Bytes

Versions: 50

Compression:

Stored size: 426 Bytes

Contents

Blacklight.onLoad(function() {
  // Button clicks should change focus. As of 10/3/19, Firefox for Mac and
  // Safari both do not set focus to a button on button click.
  // See https://zellwk.com/blog/inconsistent-button-behavior/ for background information
  document.querySelectorAll('button.collapse-toggle').forEach((button) => {
    button.addEventListener('click', () => {
      event.target.focus();
    });
  });
});

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
blacklight-7.40.0 app/javascript/blacklight/button_focus.js
blacklight-7.39.0 app/javascript/blacklight/button_focus.js
blacklight-7.38.0 app/javascript/blacklight/button_focus.js
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/javascript/blacklight/button_focus.js
blacklight-7.37.0 app/javascript/blacklight/button_focus.js
blacklight-7.36.2 app/javascript/blacklight/button_focus.js
blacklight-7.36.1 app/javascript/blacklight/button_focus.js
blacklight-7.36.0 app/javascript/blacklight/button_focus.js
blacklight-7.35.0 app/javascript/blacklight/button_focus.js
blacklight-7.34.0 app/javascript/blacklight/button_focus.js
blacklight-7.33.1 app/javascript/blacklight/button_focus.js
blacklight-7.33.0 app/javascript/blacklight/button_focus.js
blacklight-7.32.0 app/javascript/blacklight/button_focus.js
blacklight-7.31.0 app/javascript/blacklight/button_focus.js
blacklight-7.30.0 app/javascript/blacklight/button_focus.js
blacklight-7.29.0 app/javascript/blacklight/button_focus.js
blacklight-7.28.0 app/javascript/blacklight/button_focus.js
blacklight-7.27.1 app/javascript/blacklight/button_focus.js
blacklight-7.27.0 app/javascript/blacklight/button_focus.js
blacklight-7.26.1 app/javascript/blacklight/button_focus.js