Closed Bug 183401 Opened 22 years ago Closed 18 years ago

Bring target tab to front on link drop, based on tab load-in-background setting

Categories

(Camino Graveyard :: Tabbed Browsing, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.5

People

(Reporter: bugmail, Assigned: bugzilla-graveyard)

References

Details

(Keywords: fixed1.8.1.1)

Attachments

(1 obsolete file)

If the user has specified that tabs open in the foreground in the Preferences,
then dragging a link to a background tab should bring that tab to the foreground
as it does in Mozilla.

Otherwise, the current behavior, leaving the target tab in the background,
should persist.
-> smfr
Assignee: pinkerton → sfraser
Summary: Bring target tab of drag and drop operation to front based on tab foreground/background setting → Bring target tab of drag-and-drop operation to front (based perhaps on tab foreground/background setting)
Note that Firebird also does this correctly (that is, like Mozilla), also, based
on its' load-links-in-background setting.
Summary: Bring target tab of drag-and-drop operation to front (based perhaps on tab foreground/background setting) → Bring target tab to front on link drop, based on tab load-in-background setting
Consider for 0.8?
I agree. Targeting for 1.0.
Target Milestone: --- → Camino1.0
Bump. This is important, but maybe not for 1.0 now. How simple is this to fix?
Target Milestone: Camino1.0 → Camino1.1
QA Contact: bugzilla → tabbed.browsing
Target Milestone: Camino1.1 → Camino1.2
Blocks: 320668
No longer blocks: 320668
This ought to work:

    // if the user wants tabs to load in the background, DO NOT activate the URI when loading it
    BOOL loadInBG  = ![[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
    NSLog(@"Over a tabViewItem, will activate = %d", loadInBG);

(inserted at line 295 of BrowserTabView.mm), but for some reason, when I pass |loadURI:referrer:flags:activate:allowPopups| a YES in the activate: parameter, it doesn't work.

I wonder if that's a bug in the loadURI method on BrowserWrapper?

cl
I now see why I thought the loadURI method had a bug: the "activate" parameter doesn't actually activate the tab. From discussion on IRC, it seems that it puts focus in the content area.

I told Ian to look into re-naming that everywhere, and I'll file a separate bug for it.

cl
Assignee: sfraser_bugs → bugzilla
Status: NEW → ASSIGNED
Attachment #223390 - Flags: review?(hwaara)
Targeting for 1.1 since we've got a patch now.

cl
Target Milestone: Camino1.2 → Camino1.1
Comment on attachment 223390 [details] [diff] [review]
selects the tabViewItem that is the drag target if tabs load in foreground

Shouldn't this respect the shift toggle, too?

Otherwise, it seems to work.
Comment on attachment 223390 [details] [diff] [review]
selects the tabViewItem that is the drag target if tabs load in foreground

>+    // if the user wants tabs to load in the background, DO NOT select the tab that is the drag target after loading the URI
>+    BOOL shouldSelectTab  = ![[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
>+    if (shouldSelectTab)
>+      [self selectTabViewItem:overTabViewItem];

What if shift is currently held down?

If only there were some kind of central method somewhere that would do the right thing...
(In reply to comment #10)
> What if shift is currently held down?
> 
> If only there were some kind of central method somewhere that would do the
> right thing...

Yeah, that has been haunting us in so many bugs already!

I think that checking the current modifiers works, as long as you're not in a menu (in which case you ideally add an alternate menuitem). Chris, wanna try that in this patch?
Comment on attachment 223390 [details] [diff] [review]
selects the tabViewItem that is the drag target if tabs load in foreground

Obsolete. See bug 320668 for current patch.

cl
Attachment #223390 - Attachment is obsolete: true
Attachment #223390 - Flags: review?(hwaara)
Depends on: 320668, 337958
Chris, this was fixed by the checkin from bug 320668, right?
Affirmative, sir.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Keywords: fixed1.8.1.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: