Browse Source
Merge pull request #3961 from abpframework/liangshiwei/patch-1
Fix modal open event bug
pull/3970/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js
|
|
|
@ -95,8 +95,11 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f |
|
|
|
}); |
|
|
|
|
|
|
|
_$modal.on('shown.bs.modal', function () { |
|
|
|
//focuses first element if it's a typeable input.
|
|
|
|
//focuses first element if it's a typeable input.
|
|
|
|
var $firstVisibleInput = _$modal.find('input:not([type=hidden]):first'); |
|
|
|
|
|
|
|
_onOpenCallbacks.triggerAll(_publicApi); |
|
|
|
|
|
|
|
if ($firstVisibleInput.hasClass("datepicker")) { |
|
|
|
return; //don't pop-up date pickers...
|
|
|
|
} |
|
|
|
@ -107,7 +110,6 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f |
|
|
|
} |
|
|
|
|
|
|
|
$firstVisibleInput.focus(); |
|
|
|
_onOpenCallbacks.triggerAll(_publicApi); |
|
|
|
}); |
|
|
|
|
|
|
|
var modalClass = abp.modals[options.modalClass]; |
|
|
|
|