Closed Bug 1127609 Opened 9 years ago Closed 9 years ago

Debug log tab searches in wrong direction

Categories

(Instantbird Graveyard :: Other, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: nhnt11)

Details

Attachments

(1 file, 1 obsolete file)

STR: Repeat search in a debug log tab using the keyboard will search upwards instead of downwards, which is confusing.

Probably due to having copied the findbar from a convbrowser.
Attached patch Patch (obsolete) — Splinter Review
This fixes the issue.
Let me know if the comment is good enough.
Assignee: nobody → nhnt11
Status: NEW → ASSIGNED
Attachment #8557649 - Flags: review?(aleth)
A bit of detail: the reversed searching happens because the find commands in instantbird.xul assume that all panels are conversations. The relevant keyboard shortcuts are Cmd(+Shift)+G.
Comment on attachment 8557649 [details] [diff] [review]
Patch

Review of attachment 8557649 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for taking care of this!

::: im/content/instantbird.xul
@@ +77,5 @@
> +                          return;
> +                        }
> +                        var panel = getTabBrowser().selectedPanel;
> +                        if (!panel) return;
> +                        if (panel.findbar) panel.findbar.onFindAgainCommand(false);"/>

I'm not sure, but would it be clearer to do something like

var findbar, isReversedDirection = false;
var conv = getTabBrowser.selectedConversation;
if (conv) {
  isReversedDirection = true;
  findbar = conv.findbar;
}
else {
  var panel = getTabbrowser.selectedPanel;
  if (!panel)
    return;
  findbar = panel.findbar;
}
findbar.onFindAgainCommand(isReversedDirection);
Attachment #8557649 - Flags: review?(aleth) → review+
Attached patch Patch v2Splinter Review
Moves the code to a function that accepts one parameter to avoid duplication.
Attachment #8557649 - Attachment is obsolete: true
Attachment #8564456 - Flags: review?(aleth)
Comment on attachment 8564456 [details] [diff] [review]
Patch v2

Review of attachment 8564456 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8564456 - Flags: review?(aleth) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: