Closed Bug 297365 Opened 20 years ago Closed 8 years ago

adding search term to a "full" saved search dialog scrolls term being edited out of view

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: asa, Unassigned)

Details

(Whiteboard: has draft patch)

Attachments

(2 files)

If you have four or more terms in a saved search (such that the next one will
create a scrollbar) and you create one more somewhere in the middle of the list
using the "+" button, the list scrolls to the bottom even if the term you were
adding is up at the top. 

Steps:

1. create a saved search with four criteria and close the dialog.
2. open the saved search and click the "+" button next to the top search to
insert a new criteria box between the first and second items.

Results: the list is scrolled to the bottom
Expected: the list should not scroll.

The new criteria still has the focus highlight, but the list gets scrolled to
the end as if that's where the new term was supposed to be. This is especially
painful when you have a long list and you're adding terms in the middle of the list.
Target Milestone: --- → Thunderbird1.1
Attached patch the fixSplinter Review
We used to always scroll to the last row after we add a new row to the search
dialog box.

The fix is to pass in rowNumber (the row whose add button was just pressed) + 1
to ensure that the next row (which is the one we just added) is scrolled into
view.

onMore gets called when the dialog first comes up to create the very first
search term row so I had to add an extra check for that condition:

scrollToLastSearchTerm(gTotalSearchTerms == 1 ? 0 : rowNumber + 1);
Attachment #186162 - Flags: superreview?(bienvenu)
Attachment #186162 - Flags: approval-aviary1.1a2?
Attachment #186162 - Flags: superreview?(bienvenu) → superreview+
Attachment #186162 - Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
this logic can be cleaned up a bit and the method name needs renamed to be more
clear. 
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch better fixSplinter Review
Attachment #186536 - Flags: superreview+
QA Contact: front-end
similar issue occurs no matter where add the new term, as long as term being modified is at the top or bottom of the dialog's view.
Severity: normal → minor
Summary: creating a 5th search term in a saved search dialog scrolls to bottom of list → adding search term to a "full" saved search dialog scrolls term being edited out of view
Whiteboard: has draft patch
Target Milestone: Thunderbird1.1 → ---
I don't see this on linux trunk...?
(In reply to comment #5)
> I don't see this on linux trunk...?

Think I better understand comment 0, and I agree WFM.

However, please check my detective work ...
- attachment 186536 [details] [diff] [review], the "better fix", did not check in.
- attachment 186162 [details] [diff] [review], the first fix, checked in (1.41 scott 2005-06-14 16:20).  
Scott, do you still want the "better fix"? It should be ready for check-in.
Assignee: mscott → nobody
Status: REOPENED → NEW
(In reply to Asa Dotzler [:asa] from comment #0)
> Steps:
> 
> 1. create a saved search with four criteria and close the dialog.
> 2. open the saved search and click the "+" button next to the top search to
> insert a new criteria box between the first and second items.
> 
> Results: the list is scrolled to the bottom
> Expected: the list should not scroll.

It doesn't get scrolled anymore. WFM.

Thunderbird 52.0 (32-bit)
Windows 7 64-bit
Status: NEW → RESOLVED
Closed: 20 years ago8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: