mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-10 00:18:57 +00:00
Fix ngbDropdown stealing keyboard events
This commit is contained in:
@@ -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'
|
||||
|
Reference in New Issue
Block a user