Fill in getModifierState when it's not defined
CustomEvent fired by the testing framework does not define a getModifierState function on the event. Change-Id: Ie490d2505780f241661e2dde36128f4e120cc89f
This commit is contained in:
		@@ -40,11 +40,14 @@ util.escapeHTML = function(str) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
util.shouldSupressKeyboardShortcut = function(e) {
 | 
			
		||||
  var getModifierState = e.getModifierState ?
 | 
			
		||||
      e.getModifierState.bind(e) :
 | 
			
		||||
      function() { return false; };
 | 
			
		||||
  var target = e.detail ? e.detail.keyboardEvent : e.target;
 | 
			
		||||
  return e.getModifierState('Control') ||
 | 
			
		||||
         e.getModifierState('Alt') ||
 | 
			
		||||
         e.getModifierState('Meta') ||
 | 
			
		||||
         e.getModifierState('Fn') ||
 | 
			
		||||
  return getModifierState('Control') ||
 | 
			
		||||
         getModifierState('Alt') ||
 | 
			
		||||
         getModifierState('Meta') ||
 | 
			
		||||
         getModifierState('Fn') ||
 | 
			
		||||
         target.tagName == 'INPUT' ||
 | 
			
		||||
         target.tagName == 'TEXTAREA' ||
 | 
			
		||||
         target.tagName == 'SELECT' ||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user