Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Panorama "move tab to group" event?

52 views
Skip to first unread message

The Wanderer

unread,
Nov 5, 2012, 11:12:42 AM11/5/12
to
I'm trying to update BarTab so that the "select nearest loaded tab" option works
as expected in post-3.x versions of Firefox. This mainly means making it work as
expected with Panorama.

I've already gotten most of it working, but I still get unexpected behavior when
moving the current tab to a different tab group, via the tab context menu's
"Move to Group" sub-menu. In order to correct that, I need to be able to respond
when such a move happens.

BarTab responds to tab closings by listening on the TabClose event, via
tabContainer.AddEventListener(). The obvious thing to do would be to add another
listener, with an appropriate event; however, looking at the MDN "Mozilla event
reference" page, I do not see any apparent event which seems like it would fire
on "tab move to group".

(Based on what I've learned about the apparent underlying implementation of tab
groups, I suspect that "move tab to new group" is currently implemented simply
as "move tab to new offset in the current window's tab list", which - in the
absence of tab groups - doesn't seem like that the sort of thing that would need
an event. That would explain the lack, but it doesn't really help me even if
true.)

How can I hook in to respond when a tab is moved to a new tab group?

--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Every time you let somebody set a limit they start moving it.
- LiveJournal user antonia_tiger

The Wanderer

unread,
Nov 7, 2012, 1:01:22 PM11/7/12
to
On 11/05/2012 11:12 AM, The Wanderer wrote:

> I'm trying to update BarTab so that the "select nearest loaded tab" option
> works as expected in post-3.x versions of Firefox. This mainly means making
> it work as expected with Panorama.

<snip>

> How can I hook in to respond when a tab is moved to a new tab group?

Anyone?

Is there a better place to ask this question? I'm not sure it would be welcome
on the main Firefox development (list|group), but that's the only other
candidate I know of, unless there's an appropriate IRC channel somewhere.

Where do the Panorama developers and/or maintainers hang out?

teramako

unread,
Nov 8, 2012, 1:54:33 AM11/8/12
to
Hi

> How can I hook in to respond when a tab is moved to a new tab group?

I'm developing an extension named Pano [1] which shows all tabs in tabgroups to the sidebar.

In my case:
I also searched the DOM event which is dispatched when a tab moved to another group, but could not find out.
So, I decided overwriting `TabView._window.GroupItems.moveTabToGroupItem()` method [2] for dispatching a DOM event "TabGroupMove"


[1]: https://addons.mozilla.org/en-US/firefox/addon/pano/
[2]: https://github.com/teramako/Pano/blob/master/modules/panoramaTree.jsm#L256

--
teramako

The Wanderer

unread,
Nov 8, 2012, 11:11:17 AM11/8/12
to
On 11/08/2012 01:54 AM, teramako wrote:

> Hi
>
>> How can I hook in to respond when a tab is moved to a new tab group?
>
> I'm developing an extension named Pano [1] which shows all tabs in tabgroups
> to the sidebar.
>
> In my case:
> I also searched the DOM event which is dispatched when a tab moved to another
> group, but could not find out.
> So, I decided overwriting `TabView._window.GroupItems.moveTabToGroupItem()`
> method [2] for dispatching a DOM event "TabGroupMove"

Thanks; that's a bit beyond my previous experience and skill level, but it looks
like I might be able to adapt that approach into something which could work.
0 new messages