With the new auto-complete feature for SQL, the tab key *always* opens the auto-complete suggestions popup, even when the cursor is at the start of a new line or immediately after a whitespace. This makes tab unusable for spacing/formatting, which is difficult functionality to use. In a code editor, I expect tab to auto-complete if I've started a word/string, but to insert a whitespace if I'm at the start of a line or otherwise between words.
Hm, I don't think the tab ever worked there for adding whitespace/tab, so maybe not a regression and tab for auto-complete seems common?
I'm deeply accustomed to tab-indenting new lines when writing reports in Koha and am certain this is a change.
(In reply to Andrew Fuerste-Henry from comment #2) > I'm deeply accustomed to tab-indenting new lines when writing reports in > Koha and am certain this is a change. Hm OK, I might have never tried, but seem to remember getting annoyed by it not working in the system preferences (*UserJS etc). Maybe some changes happened over time. Usually a normal HTML input field doesn't allow it (like here in bugzilla), as the tab is used in form fields to jump to the next field.
I can confirm Andrew's report, and I agree that it is frustrating.
I notice that the "tab" is in a list of exclusions in guided_reports_start.tt at https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=32613&attachment=147715 However, it looks like it is triggering the autocomplete anyway. I imagine PTFS-Europe as the folk who introduced the change might have an idea on how to fix it.
Created attachment 159622 [details] [review] Bug 35498: Allow tab to indent lines and trigger autocomplete This patch allows the tab key to indent lines as well as trigger autocomplete. Test plan: 1) Apply patch, navigate to reports and create a new SQL report 2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options 3) Type something to select from the autocomplete box and press tab - it should autocomplete that option 4) Type any word and then press space. Now press tab and it should indent again
Created attachment 159623 [details] [review] Bug 35498: Allow tab to indent lines and trigger autocomplete This patch allows the tab key to indent lines as well as trigger autocomplete. Test plan: 1) Apply patch, navigate to reports and create a new SQL report 2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options 3) Type something to select from the autocomplete box and press tab - it should autocomplete that option 4) Type any word and then press space. Now press tab and it should indent again
Created attachment 159625 [details] [review] Bug 35498: Allow tab to indent lines and trigger autocomplete This patch allows the tab key to indent lines as well as trigger autocomplete. Test plan: 1) Apply patch, navigate to reports and create a new SQL report 2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options 3) Type something to select from the autocomplete box and press tab - it should autocomplete that option 4) Type any word and then press space. Now press tab and it should indent again Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 159626 [details] [review] Bug 35498: Allow tab to indent lines and trigger autocomplete This patch allows the tab key to indent lines as well as trigger autocomplete. Test plan: 1) Apply patch, navigate to reports and create a new SQL report 2) Click in the text editor and press tab, it should indent and then trigger the autocomplete options 3) Type something to select from the autocomplete box and press tab - it should autocomplete that option 4) Type any word and then press space. Now press tab and it should indent again Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thanks for the quick fix, Matt. Works great, passing QA.
You're a legend, Matt. Thanks for hopping on this one!
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.02
Backported to 23.05.x for upcoming 23.05.08