Removed a redundant global window.addEventListener('keydown', ...) in the Knowledge.svelte command component that duplicated the Enter key handling already provided by CommandSuggestionList's _onKeyDown method (called by TipTap's suggestion renderer plugin)
When typing #, backspacing to remove it, then typing # again and selecting a URL, the select() function fired twice — once through TipTap's suggestion plugin key handler and once through the redundant global listener — causing the URL to be indexed twice
The fix removes the duplicate listener, relying solely on the suggestion renderer's existing key event pipeline
Test plan
Type # in the chat input, then press Backspace to remove it
Type # again and enter/select a URL
Verify the URL is indexed only once (not duplicated in the files list)
Verify that Enter/Tab key selection still works correctly in the # knowledge suggestion dropdown
Verify that @, /, and $ trigger suggestions are unaffected
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/22859
**Author:** [@gambletan](https://github.com/gambletan)
**Created:** 3/19/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/duplicate-url-indexing-22749`
---
### 📝 Commits (1)
- [`a09bee4`](https://github.com/open-webui/open-webui/commit/a09bee40049dc3cd2a2e99cc144533628e59c136) fix: remove duplicate keydown listener causing URL double-indexing on # trigger
### 📊 Changes
**1 file changed** (+0 additions, -13 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/components/chat/MessageInput/Commands/Knowledge.svelte` (+0 -13)
</details>
### 📄 Description
## Summary
Fixes #22749
- Removed a redundant global `window.addEventListener('keydown', ...)` in the `Knowledge.svelte` command component that duplicated the Enter key handling already provided by `CommandSuggestionList`'s `_onKeyDown` method (called by TipTap's suggestion renderer plugin)
- When typing `#`, backspacing to remove it, then typing `#` again and selecting a URL, the `select()` function fired twice — once through TipTap's suggestion plugin key handler and once through the redundant global listener — causing the URL to be indexed twice
- The fix removes the duplicate listener, relying solely on the suggestion renderer's existing key event pipeline
## Test plan
- [ ] Type `#` in the chat input, then press Backspace to remove it
- [ ] Type `#` again and enter/select a URL
- [ ] Verify the URL is indexed only once (not duplicated in the files list)
- [ ] Verify that Enter/Tab key selection still works correctly in the `#` knowledge suggestion dropdown
- [ ] Verify that `@`, `/`, and `$` trigger suggestions are unaffected
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22859
Author: @gambletan
Created: 3/19/2026
Status: ❌ Closed
Base:
main← Head:fix/duplicate-url-indexing-22749📝 Commits (1)
a09bee4fix: remove duplicate keydown listener causing URL double-indexing on # trigger📊 Changes
1 file changed (+0 additions, -13 deletions)
View changed files
📝
src/lib/components/chat/MessageInput/Commands/Knowledge.svelte(+0 -13)📄 Description
Summary
Fixes #22749
window.addEventListener('keydown', ...)in theKnowledge.sveltecommand component that duplicated the Enter key handling already provided byCommandSuggestionList's_onKeyDownmethod (called by TipTap's suggestion renderer plugin)#, backspacing to remove it, then typing#again and selecting a URL, theselect()function fired twice — once through TipTap's suggestion plugin key handler and once through the redundant global listener — causing the URL to be indexed twiceTest plan
#in the chat input, then press Backspace to remove it#again and enter/select a URL#knowledge suggestion dropdown@,/, and$trigger suggestions are unaffected🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.