diff options
author | Teddy Wing | 2023-03-28 23:43:38 +0200 |
---|---|---|
committer | Teddy Wing | 2023-03-28 23:43:38 +0200 |
commit | aa10901dacf562ef64d4015d3b391934ee07a64f (patch) | |
tree | 7dc6b63630ed974ed9762244d7510617c76ad2ef | |
parent | 6e06bc2f686b415ff23515f9d6ab8df9df200812 (diff) | |
download | jira-fixes-aa10901dacf562ef64d4015d3b391934ee07a64f.tar.bz2 |
We only need the observer once to focus the left column on page load.
After that, we don't need to be listening to DOM changes.
Without disconnecting the observer, this broke '@'-name completion to
reference other users. Because that completion adds a new element (the
user list picker) to the column, our mutation observer gets called, and
we focus the left column, un-focussing the comment area.
Glad to have finally discovered why '@'-name completion in Jira comments
broke for me.
-rw-r--r-- | jira-fixes.user.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/jira-fixes.user.js b/jira-fixes.user.js index 6ba98a2..9eaf20c 100644 --- a/jira-fixes.user.js +++ b/jira-fixes.user.js @@ -45,6 +45,7 @@ function ticket_page_focus_left_content_column () { } left_column_content.focus(); + observer.disconnect(); } }); |