var $ = require('jquery');
var domready = require('domready');
var bootstrap = require('bootstrap');

if (!window.console) {
  var noOp = function() {};
  console = {
    log: noOp,
    warn: noOp,
    error: noOp,
  };
}
domready(function() {
  $('.doorbell-show').click(function(e) {
    if (typeof doorbell !== 'undefined') {
      e.preventDefault();
      doorbell.show();
    }
  });
  $('select.js-submit-on-change').on('change click', function() {
    this.form.submit();
  });
});

var $ = require('jquery');
var domready = require('domready');
var bootstrap = require('bootstrap');

if (!window.console) {
  var noOp = function() {};
  console = {
    log: noOp,
    warn: noOp,
    error: noOp,
  };
}
domready(function() {
  $('.doorbell-show').click(function(e) {
    if (typeof doorbell !== 'undefined') {
      e.preventDefault();
      doorbell.show();
    }
  });
  $('.js-submit-on-change').on('change', function() {
    this.form.submit();
  });
});

Fix submit-on-change handling for selects
Fix submit-on-change handling for selects

I was under the false impression that it was necessary, and safe, to
listen to the click event as well as the change. In fact, that's not
required and causes buggy behaviour in some browsers.
