mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
Fix ngbDropdown stealing keyboard events
This commit is contained in:
parent
c6e7d06bb7
commit
b403b9d9d5
3 changed files with 108 additions and 85 deletions
|
|
@ -442,6 +442,13 @@ describe('GlobalSearchComponent', () => {
|
|||
expect(focusSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should prevent event propagation for keyboard events on buttons that are not arrows', () => {
|
||||
const event = { stopImmediatePropagation: jest.fn(), key: 'Enter' }
|
||||
const stopPropagationSpy = jest.spyOn(event, 'stopImmediatePropagation')
|
||||
component.onButtonKeyDown(event as any)
|
||||
expect(stopPropagationSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should support explicit advanced search', () => {
|
||||
const qfSpy = jest.spyOn(documentListViewService, 'quickFilter')
|
||||
component.query = 'test'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue