When adding a new SQL report you have to tab to or click the report name field. It would be more efficient to set the focus automatically by adding a "focus" class to the <input>
Created attachment 115275 [details] [review] Bug 27436: Set focus for cursor to report name field when creating new SQL report This patch focuses the cursor on the 'Report name' field when creating a new SQL report Test plan: 1. Navigate to the 'Create report from SQL' page (Home -> Reports -> Guided reports Wizard -> Create from SQL) 2. Observe that the 'Report name' box is not focused on 3. Apply the patch, log in, log out. 4. Repeat step 1. The 'Report name' box should now be focused on.
Created attachment 115307 [details] [review] Bug 27436: Set focus for cursor to report name field when creating new SQL report This patch focuses the cursor on the 'Report name' field when creating a new SQL report Test plan: 1. Navigate to the 'Create report from SQL' page (Home -> Reports -> Guided reports Wizard -> Create from SQL) 2. Observe that the 'Report name' box is not focused on 3. Apply the patch, log in, log out. 4. Repeat step 1. The 'Report name' box should now be focused on. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Works as described.
Created attachment 115573 [details] [review] Bug 27436: Set focus for cursor to report name field when creating new SQL report This patch focuses the cursor on the 'Report name' field when creating a new SQL report Test plan: 1. Navigate to the 'Create report from SQL' page (Home -> Reports -> Guided reports Wizard -> Create from SQL) 2. Observe that the 'Report name' box is not focused on 3. Apply the patch, log in, log out. 4. Repeat step 1. The 'Report name' box should now be focused on. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
It might be nice to have the sql textarea focused when editing an existing report, but this is a great improvement!
Focus must be put using the "focus" class instead.
Created attachment 139419 [details] [review] Bug 27436: Set focus on first input when adding a new SQL report When adding a new SQL report, the focus/cursor should be in the first input field of the form: Report name To test: * Add a new SQL report in reports > new from SQL - cursur is in no field * Apply patch * Add another new SQL report - cursor is now in the first input field of the form: Report name
I implemented the standard solution for setting the focus using the CSS class as suggested in comment#6. As both patches were one line fixes mine replaces James' previous patch. I didn't see a better way, if you prefer this as a follow-up, please let me know. I didn't change the behavior for editing an existing patch as I think while SQL might be the most 'common' field to change, it could also be a danger of making unwanted changes and I found other examples where on editing the focus is on top.
Created attachment 139427 [details] [review] Bug 27436: Set focus on first input when adding a new SQL report When adding a new SQL report, the focus/cursor should be in the first input field of the form: Report name To test: * Add a new SQL report in reports > new from SQL - cursur is in no field * Apply patch * Add another new SQL report - cursor is now in the first input field of the form: Report name Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 140157 [details] [review] Bug 27436: Set focus on first input when adding a new SQL report When adding a new SQL report, the focus/cursor should be in the first input field of the form: Report name To test: * Add a new SQL report in reports > new from SQL - cursur is in no field * Apply patch * Add another new SQL report - cursor is now in the first input field of the form: Report name Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 22.11. Nice work everyone, thanks!