mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 07:28:05 +08:00
Merge remote-tracking branch 'origin/main' into feat/model-plugins-implementing
This commit is contained in:
@ -146,16 +146,6 @@ describe('isEventTargetInputArea', () => {
|
||||
expect(isEventTargetInputArea(el)).toBe(true)
|
||||
})
|
||||
|
||||
it('should return true for monaco editor descendants', () => {
|
||||
const wrapper = document.createElement('div')
|
||||
wrapper.className = 'monaco-editor'
|
||||
const child = document.createElement('div')
|
||||
wrapper.appendChild(child)
|
||||
document.body.appendChild(wrapper)
|
||||
expect(isEventTargetInputArea(child)).toBe(true)
|
||||
wrapper.remove()
|
||||
})
|
||||
|
||||
it('should return undefined for non-input elements', () => {
|
||||
const el = document.createElement('div')
|
||||
expect(isEventTargetInputArea(el)).toBeUndefined()
|
||||
|
||||
@ -32,9 +32,6 @@ export const isEventTargetInputArea = (target: HTMLElement) => {
|
||||
|
||||
if (target.contentEditable === 'true')
|
||||
return true
|
||||
|
||||
if (target.closest?.('.monaco-editor, .monaco-diff-editor'))
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user