Recompile assets for #1362
This commit is contained in:
parent
9ebd084e89
commit
7f62725c1c
|
|
@ -432,7 +432,8 @@ var $targetElement=e.target||e.srcElement;var btnIndex=-1;for(var i=0;i<$modalBu
|
|||
if(keyCode===9){if(btnIndex===-1){$targetElement=$okButton;}else{if(btnIndex===$modalButtons.length-1){$targetElement=$modalButtons[0];}else{$targetElement=$modalButtons[btnIndex+1];}}
|
||||
stopEventPropagation(e);$targetElement.focus();}else{if(keyCode===13||keyCode===32){if(btnIndex===-1){$targetElement=$okButton;}else{$targetElement=undefined;}}else if(keyCode===27&&!($cancelButton.hidden||$cancelButton.style.display==='none')){$targetElement=$cancelButton;}else{$targetElement=undefined;}
|
||||
if($targetElement!==undefined){fireClick($targetElement,e);}}}
|
||||
previousWindowKeyDown=window.onkeydown;window.onkeydown=handleKeyDown;function handleOnBlur(e){var $targetElement=e.target||e.srcElement,$focusElement=e.relatedTarget,modalIsVisible=hasClass(modal,'visible');if(modalIsVisible){var btnIndex=-1;if($focusElement!==null){for(var i=0;i<$modalButtons.length;i++){if($focusElement===$modalButtons[i]){btnIndex=i;break;}}
|
||||
previousWindowKeyDown=window.onkeydown;window.onkeydown=handleKeyDown;function handleOnBlur(e){var $targetElement=e.target||e.srcElement,$focusElement=e.relatedTarget,modalIsVisible=hasClass(modal,'visible'),bootstrapModalIsVisible=document.querySelector('.control-popup.modal')||false;if(bootstrapModalIsVisible){return;}
|
||||
if(modalIsVisible){var btnIndex=-1;if($focusElement!==null){for(var i=0;i<$modalButtons.length;i++){if($focusElement===$modalButtons[i]){btnIndex=i;break;}}
|
||||
if(btnIndex===-1){$targetElement.focus();}}else{lastFocusedButton=$targetElement;}}}
|
||||
$okButton.onblur=handleOnBlur;$cancelButton.onblur=handleOnBlur;window.onfocus=function(){window.setTimeout(function(){if(lastFocusedButton!==undefined){lastFocusedButton.focus();lastFocusedButton=undefined;}},0);};};window.swal.setDefaults=function(userParams){if(!userParams){throw new Error('userParams is required');}
|
||||
if(typeof userParams!=='object'){throw new Error('userParams has to be a object');}
|
||||
|
|
|
|||
|
|
@ -389,8 +389,9 @@
|
|||
modalIsVisible = hasClass(modal, 'visible'),
|
||||
bootstrapModalIsVisible = document.querySelector('.control-popup.modal') || false;
|
||||
|
||||
if(bootstrapModalIsVisible) {
|
||||
// Bootstrap will enforce focus on the existing model, so don't do anything here to prevent infinite loop
|
||||
if (bootstrapModalIsVisible) {
|
||||
// Bootstrap will enforce focus on the existing model, so don't
|
||||
// do anything here to prevent infinite loop.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue