Browse Source
Merge pull request #16012 from abpframework/auto-merge/rel-7-1/1811
Merge branch dev with rel-7.1
pull/16013/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js
-
npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts
-
npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts
|
|
|
@ -93,6 +93,9 @@ |
|
|
|
} |
|
|
|
let name = $(this).attr("name"); |
|
|
|
let selectedTextInputName = name + "_Text"; |
|
|
|
if(name.indexOf(".ExtraProperties[") > 0) { |
|
|
|
selectedTextInputName = name.substring(0, name.length - 1) + "_Text]" |
|
|
|
} |
|
|
|
let selectedTextInput = $('<input>', { |
|
|
|
type: 'hidden', |
|
|
|
id: selectedTextInputName, |
|
|
|
|
|
|
|
@ -196,7 +196,7 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { |
|
|
|
.pipe( |
|
|
|
takeUntil(this.destroy$), |
|
|
|
debounceTime(150), |
|
|
|
filter((key: KeyboardEvent) => key && key.key === 'Escape'), |
|
|
|
filter((key: KeyboardEvent) => key && key.key === 'Escape' && this.options.keyboard), |
|
|
|
) |
|
|
|
.subscribe(() => this.close()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -158,8 +158,9 @@ describe('ModalComponent', () => { |
|
|
|
spectator.dispatchKeyboardEvent(spectator.component.modalWindowRef, 'keyup', 'Escape'); |
|
|
|
|
|
|
|
await wait300ms(); |
|
|
|
const { keyboard } = spectator.component.options; |
|
|
|
|
|
|
|
expect(spectator.component.visible).toBe(false); |
|
|
|
expect(spectator.component.visible).toBe(!keyboard); |
|
|
|
}); |
|
|
|
|
|
|
|
it('should not close when busy is true', async () => { |
|
|
|
|