MozillaZine

[Ext] MClickFocusTab

Announce and Discuss the Latest Theme and Extension Releases.
yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted September 22nd, 2010, 1:15 pm

Hello, new version has been released:
3.6.20100921: https://addons.mozilla.org/en-US/firefo ... /versions/
+ Added: New Options Dialog.

Image

Now, you can customize it by your favorite way.

hllwn
 
Posts: 54
Joined: March 6th, 2010, 9:52 pm

Post Posted October 18th, 2010, 6:20 pm

I discovered a bug recently. MClickFocusTab messes up my tab focus order. I'm using Tabutilities for tab management and it's configured as if I close any tab, it will focus to the next right tab. But when MClickFocusTab is enabled, it focuses to some other tab.

For example I'm opening 5 links from tab A.

A>1>2>3>4>5

MClickFocusTab extension is enabled: When I select tab 3 then close it, tab A is selected (wrong behavior)
MClickFocusTab extension is disabled: When I select tab 3 then close it, tab 4 is selected (right behavior)

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted October 20th, 2010, 11:32 am

hllwn wrote:I discovered a bug recently. MClickFocusTab messes up my tab focus order. I'm using Tabutilities for tab management and it's configured as if I close any tab, it will focus to the next right tab. But when MClickFocusTab is enabled, it focuses to some other tab.

Hello, I can't reproduce it. What version of TabUtilities that you are using? Have you tried its *pre* version ?
Please help create a new profile with only both extensions installed, find the reproduce steps and give me your configurations. Thank you.

v2ike6udik
 
Posts: 1
Joined: October 3rd, 2011, 5:41 pm

Post Posted October 3rd, 2011, 7:10 pm

Inspected the code. There is a quite obvious bug.

Set your timeout to 1000, so it is easier to spot the bug.
And start vigorously clicking. Blah... there it is. Unwanted tab switch.

mcft._state and setTimeOut go out of sync. You have single state per page, mannnymannny timeouts...

I put some clearTimeout here and there... simple fix (may break smth else you have there, but it went toooo annoying for me :)

Also made my link backgrounds to turn into red. ;) So much easier to spot accidential onLongClicks... so I can move my mouse away to cancel.

Code: Select all
/*..*/
// FIX...
_timerid: null,
clearTimeout: function() {
   if(mcft._timerid){
      clearTimeout(mcft._timerid);
      mcft._timerid = null;
   }
},

/*..*/

   window.addEventListener("mousedown", function(event) {
      if (event && event.button == 1) {
         if (event.target.localName != "tabbrowser") {
            mcft.clearTimeout(); // FIX
            // at first glance it seems lik there is no need for this,
            // but let me tell ya... onVigorClick event there is
            // a need for this for every 30-40th click
            mcft._state = mcft.MCLICK_STATE_DOWN;
            mcft._timerid = setTimeout(function() {

/*..*/

   window.addEventListener("mouseup", function(event) {
      setTimeout(function(){
         mcft.clearTimeout();  // FIX
         mcft._state = mcft.MCLICK_STATE_NONE;
         mcft.highlight();
      }, 0);
   }, true);
/*..*/

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted October 8th, 2011, 1:09 pm

v2ike6udik wrote:Inspected the code. There is a quite obvious bug.

Hello,
Thanks for the bug report, please try the following new version:
v7.0.20111008: https://addons.mozilla.org/en-US/firefo ... /versions/
+ Fixed: Use clearTimeout to prevent duplicate setTimeout call.

travis_san
 
Posts: 27
Joined: March 23rd, 2011, 10:04 pm

Post Posted October 19th, 2011, 11:46 am

This extension is great, nice work. Feature request:

I'd like to see an option to have foreground tabs open immediately after 'holding time', not only after button release.

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted October 21st, 2011, 10:47 pm

travis_san wrote:I'd like to see an option to have foreground tabs open immediately after 'holding time', not only after button release.

Hello, would you please describe more detail about the steps how the "foreground tabs open immediately after 'holding time'" works? Thank you.

travis_san
 
Posts: 27
Joined: March 23rd, 2011, 10:04 pm

Post Posted October 25th, 2011, 4:17 pm

Say I set holding time to 200ms. This is the order of events:
mc = middle click

mcDown > 200ms > mcUP > new tab opens

I would prefer

mcDown > 200ms > new tab opens

This way you don't have to wait and react to the target highlighting, the foreground tab is opened right away.

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted October 26th, 2011, 9:22 am

travis_san wrote:Say I set holding time to 200ms. This is the order of events:
mc = middle click
mcDown > 200ms > mcUP > new tab opens
I would prefer
mcDown > 200ms > new tab opens
This way you don't have to wait and react to the target highlighting, the foreground tab is opened right away.

Thanks for the suggestion, please try the following new version:
v7.0.20111026: https://addons.mozilla.org/en-US/firefo ... /versions/
+ Added: (Option) Allow to open new tab immediately without need to release the button.

In your case, you should *uncheck* the checkbox of "After release the button ..."
Image

travis_san
 
Posts: 27
Joined: March 23rd, 2011, 10:04 pm

Post Posted October 31st, 2011, 11:02 am

Awesome; thanks!

circcc
 
Posts: 30
Joined: November 30th, 2011, 11:54 pm

Post Posted March 29th, 2013, 10:11 pm

Good addon. but not working with FF20.0. need update.

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted April 2nd, 2013, 11:16 pm

v20.0.20130401: https://addons.mozilla.org/en-US/firefo ... /versions/
+ Compatible with Firefox 20.0+

FM33
 
Posts: 5
Joined: July 8th, 2007, 9:20 am

Post Posted May 7th, 2016, 12:00 pm

Hello,
The extension do not work in Fx 46 : The default behaviour set in Fx preferences applies no matter how long the link is middle-clicked.

yuoo2k

User avatar
 
Posts: 720
Joined: November 1st, 2005, 9:03 am
Location: Taiwan

Post Posted May 7th, 2016, 8:00 pm

FM33 wrote:Hello,
The extension do not work in Fx 46 : The default behaviour set in Fx preferences applies no matter how long the link is middle-clicked.

Hello, sorry I can not reproduce this problem.
It maybe some other extension conflicts with MClickFocusTab.
Would you please try to create a new profile with only MClickFocusTab installed to see if it still happen.
Thanks.

--
To create a new profile:

Windows:
1. close Firefox.
2. press Win+R, enter: firefox.exe -p

Mac:
1. Cmd+Q, close Firefox.
2. press Control+Space, open Terminal
3. enter: /Applications/Firefox.app/Contents/MacOS/firefox-bin -p

FM33
 
Posts: 5
Joined: July 8th, 2007, 9:20 am

Post Posted May 11th, 2016, 1:19 am

Hello,

Indeed, it's "RequestPolicy Continued" the problem (Need to restart Fx to see the change even if the extension enables itself immediately).
Is there any way to have both extensions working ?
Thanks.

Tested in latest Nightly.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest