First Last Prev Next    No search results available
Details
: Thunderbird 60: QF context menus broken.
Bug#: 26575
: QuickFolders
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P1
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: najoll@posteo.net
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
4.11 prerelease 77 (746.50 KB, application/x-xpinstall)
2018-08-09 04:59, Axel Grude
no flags Details
4.11 prerelease 95 (746.99 KB, application/x-xpinstall)
2018-08-12 03:37, Axel Grude
no flags Details
4.11 prerelease 100 (747.22 KB, application/x-xpinstall)
2018-08-13 16:01, Axel Grude
no flags Details
4.11 prerelease 118 (747.81 KB, application/x-xpinstall)
2018-08-14 06:48, Axel Grude
no flags Details
4.11 prerelease 180 (749.58 KB, application/x-xpinstall)
2018-08-16 12:24, Axel Grude
no flags Details
4.11 prerelease 182 (749.61 KB, application/x-xpinstall)
2018-08-17 11:58, Axel Grude
no flags Details
4.11 prerelease 184 (763.20 KB, application/x-xpinstall)
2018-08-18 14:55, Axel Grude
no flags Details
4.11 prerelease 206 (763.76 KB, application/x-xpinstall)
2018-08-29 04:12, Axel Grude
no flags Details
4.11 prerelease 212 (824.73 KB, application/x-xpinstall)
2018-08-29 11:48, Axel Grude
no flags Details
4.11 prerelease 220 (764.28 KB, application/x-xpinstall)
2018-09-07 07:41, Axel Grude
no flags Details
4.11 prerelease 237 (764.45 KB, application/x-xpinstall)
2018-09-22 12:09, Axel Grude
no flags Details
4.11 prerelease 237 (764.45 KB, application/x-xpinstall)
2018-09-22 12:15, Axel Grude
no flags Details
4.11 prerelease 242 (764.57 KB, application/x-xpinstall)
2018-09-24 08:29, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2018-08-08 13:50
Please see the attached video.

Windows 8.1 x64. QF 4.10
------- Comment #1 From najoll@posteo.net 2018-08-08 13:53:50 -------
Ah, video. Did not attach. I've put the video here:

https://app.box.com/s/qlhxoo9f400lfdnyncdftnrwi1o21c8z
------- Comment #2 From Axel Grude 2018-08-08 19:05:03 -------
I have seen similar behavior (intermittently) in Thunderbird 60, it happens
S9ometimes, not always) when the mousee cursor hits the very bottom pixel of
the button / tab. The only workaround at the moment is using the keyboard to
navigate down or move the mouse faster - I spent 3 hours troubleshooting it
today (before you reported the bug). 

Hopefully I will find the reason and come up with a fix for 4.11 very soon.

Do you find that it doesn't happen on the very first tab? (Recent folder Tab -
the one with the yellow clock)
------- Comment #3 From najoll@posteo.net 2018-08-08 19:50:06 -------
Thank you for your work, Axel.

I find that the problem *does* extent to the the 'clock' / 'recents' tab.
------- Comment #4 From Axel Grude 2018-08-09 04:59:28 -------
Created an attachment (id=8507) [details]
4.11 prerelease 77

I think I managed to get rid of most of the popup side effects by offsetting
the menu 3px to the top (it used to be 1px in previous versions). 2px still
made the problem appear sporadically, -10 would remove the problem completely
(because the menu effectively would be placed underneath thee cursor, but it's
suboptimal as it obscures the folder name which removes important context)

You can experiment with changing the setting:
extensions.quickfolders.debug.popupmenus.verticalOffset
(default = -3) if you need to optimize it. 

Unfortunately, you need to eitheer restart Thunderbird or right-click a folder
> open in new window for testing the new setting. (menu offset applies in new
windows as this will trigger the initialising code)

I may also experiment in future test versions with moving the mouse cursor
position down into the menu. Might be a bit jarring though.
------- Comment #5 From Axel Grude 2018-08-09 11:31:14 -------
Additional problems: the commands on the menus and the "jump to folder"
functionality frequently stops working, so the whole system has become highly
unreliable.
------- Comment #6 From joll.nicholas@gmail.com 2018-08-10 12:35:42 -------
I just got an update to QF 4.11pre77. In that version, the menu problem
persists, but in attenuated form, i.e. it's still there, but not as bad! So
that's something!
------- Comment #7 From Axel Grude 2018-08-10 13:00:08 -------
(In reply to comment #6)
> I just got an update to QF 4.11pre77. In that version, the menu problem
> persists, but in attenuated form, i.e. it's still there, but not as bad! So
> that's something!
> 

THat's good - I think it alleviates some of the "slipping off the border of the
button" problems. However did you experience the commands (clicking a
subfolder) not working at all? I got that a lot..

I spent a few hours today using mozregression to narrow down from which exact
thunderbird version on the problem popped up but too many THunderbird versions
it downloaded weree broken (they didn't even start fully). ONe thing I am quite
certain off at this stage is that it was caused by relatively recent changes in
Thunderbird 60 and not by changes within QuickFolders. At some stage I want to
raise a Thunderbird bug on this.
------- Comment #8 From joll.nicholas@gmail.com 2018-08-10 15:16:40 -------
Dear Axel

Clicking subfolders (in QF menus) does indeed seem not to work. It is hard to
test, though, because, very often the menus disappear when I try to use them! 

I suppose we should be grateful for the TB 60 improvements . .
------- Comment #9 From Axel Grude 2018-08-12 03:37:28 -------
Created an attachment (id=8510) [details]
4.11 prerelease 95

made the delay before refreshing the icons configurable. 

Open about:config and edit the value

extensions.quickfolders.treeIconsDelay

default is 7500 (ms) which works for me but shorter delays may be possible.

# The refresh is only in done in Thunderbird versions >= 60, as it isn't
necessary in Tb 52.*
# when refreshing too early, it can lead to the CSS of QUickFolders not working
(Tab buttons and toolbar buttons unstyled)
------- Comment #10 From Tony Mechelynck 2018-08-12 04:18:21 -------
(In reply to comment #9)
> Created an attachment (id=8510) [details] [details]
> 4.11 prerelease 95
> [...]

N.B. FWIW, AFAICT this add-on identifies itself as version 4.11pre94 (not 95)
in its install.rdf. Probably not much of a problem but you never know...
------- Comment #11 From Axel Grude 2018-08-12 04:34:24 -------
(In reply to comment #10)
> (In reply to comment #9)
> > Created an attachment (id=8510) [details] [details] [details]
> > 4.11 prerelease 95
> > [...]
> 
> N.B. FWIW, AFAICT this add-on identifies itself as version 4.11pre94 (not 95)
> in its install.rdf. Probably not much of a problem but you never know...
> 

Yeah you're right. It's still build 95 I only forgot to raise the release
number in install.rdf.

unfortunately my batch script can only change the file name (and not the
version no entry) when I build, so I have to edit that manually beforehand. I
get it right about 95% of the time! :)

MY BATCH:

"C:\Program Files\7-Zip\7z" a -xr!.svn quickFolders.zip install.rdf
chrome.manifest chrome defaults license.txt
set /P quickFoldersRev=<revision.txt
set /a quickFoldersRev+=1
echo %quickFoldersRev% > revision.txt
move *.xpi "..\..\Release\_Test Versions\4.11\"
rename quickFolders.zip QuickFolders-tb-pb-sm-4.11pre%quickFoldersRev%.xpi
------- Comment #12 From Axel Grude 2018-08-12 11:57:12 -------
(In reply to comment #9)
> Created an attachment (id=8510) [details] [details]
> 4.11 prerelease 95
> 
> made the delay before refreshing the icons configurable. 

I actually meant to attach this to [Bug 26566] hence the somewhat disjointed
description. 
------- Comment #13 From Axel Grude 2018-08-13 16:01:43 -------
Created an attachment (id=8512) [details]
4.11 prerelease 100

Added an additional click handler for all folder entries (for Thunderbrid>=60
only). It feels like it makes the operation a little more reliable. Still
having the big problem of submenus erratically closing when the mouse pointer
is dragged into them), 

Also didn't add any additional click handlers for the QuickFolders / Mail
Folder commands, so they remain unreliable. (e.g. mark folder reead, get all
messages)
------- Comment #14 From Axel Grude 2018-08-14 06:48:35 -------
Created an attachment (id=8515) [details]
4.11 prerelease 118

# Added some new event handlers (instead of using "oncommand" attribute I now
use addEventListener("command" ... )
# removed injection of color names into palette menus

the inconsistency of the popup menus still largely remains...
------- Comment #15 From Axel Grude 2018-08-15 14:04:20 -------
*** Bug 26580 has been marked as a duplicate of this bug. ***
------- Comment #16 From Axel Grude 2018-08-15 14:06:22 -------
Going to drop a new version soon. The vanishing menus are still a problem,
reliability of folders clicked somewhat improved.

I have been working on this for about 40 hours so far. Still not 100% what
causes it (except that it caused by a regression in mozilla-central which is
owned by the "Firefox" team of Mozilla and not Thunderbird)

It works in Thunderbird 60.0b6 
and fails in Thunderbird 60.0b7 so this is the regression range for this bug.

I also raised
https://bugzilla.mozilla.org/show_bug.cgi?id=1482861
on this. Please add your observations there if you want.
------- Comment #17 From Axel Grude 2018-08-16 12:24:24 -------
Created an attachment (id=8519) [details]
4.11 prerelease 180

I did a crazy amount of refactoring and emergency coding to at least repair the
commands. I still do not know why the menus "vanish" when pointed to but at
least the command should now work when you manage to hit the menu with mouse.
Keyboard (oncommand) probably not so much yet. 

One problem was duplication of events in some cases so I added a safety
procedure that checks whether the same menu command has been triggered within
1000msec and discards it as a duplicate. We might tweak that and take the
waiting time down for those who are coffee addicts.
------- Comment #18 From Axel Grude 2018-08-17 08:30:13 -------
Did anyone test revisin 180? I find the commands mostly work in Thunderbird
60.0 release (except for the sometimes temperamental "vanishing" menus). Here
my test results on Windows 7 Pro 64:

Tested in Thunderbird 60:
QuickFolders Tab - Right Click - click subfolders ✔️
QuickFolders Tab - Right Click - Mark Folder Read ✔️
QuickFolders Tab - Right Click - Get Messages ✔️
'' - Right Click - QF Commands - Rename Tab ✔️
'' - Right Click - QF Commands - Remove From Category ✔️
'' - Right Click - QF Commands - Tab Color - color ✔️❌ (2)
'' - Right Click - '' - Set Tab Category ❌ (1)
'' - Right Click - ''  - Remove Tab ✔️
'' - Right Click - ''  - Insert / Remove Line Break ✔️
'' - Right Click - '' - Insert / Remove Separator ✔️
'' - Right Click - '' - Customize Icon ✔️
'' - Right Click - '' - Remove Customized Icon ✔️
'' - Right Click - Mail Folder Commands - Compact Folder ✔️
'' - Right Click - Mail Folder Commands - Delete Folder ✔️
'' - Right Click - .. - Repair Folder ✔️
'' - Right Click - .. - Search Messages ✔️
'' - Right Click - .. - Folder Properties ✔️
'' - Right Click - .. - Explore Folder Location ✔️

QuickFolders Options Button -  only brings up menu on right click (main mouse
handler is broken)
Reading List Button - only works on right-click
QuickJump button - context menu only shown on right-click. Not sure if by
design.


Right-Click + CTRL: Brings up the QuickFolders Commands Menu items, seems to
react consistently with the same items above.

(1) in Debug mode I get:
No emergency handler for this event type.
(2) only when the menu was "persistent", in this case maybe 25% of the time. I
also found that sometimes the correct color was not set.. so this needs special
investigation

I will do a separate test on 52.9 I fear that's more broken right now.
------- Comment #19 From Axel Grude 2018-08-17 08:32:11 -------
(In reply to comment #18)
> Did anyone test revisin 180? I find the commands mostly work in Thunderbird
> 60.0 release (except for the sometimes temperamental "vanishing" menus). Here
> my test results on Windows 7 Pro 64:
> 
> Tested in Thunderbird 60:
> QuickFolders Tab - Right Click - click subfolders ✔️
> QuickFolders Tab - Right Click - Mark Folder Read ✔️
> QuickFolders Tab - Right Click - Get Messages ✔️
> '' - Right Click - QF Commands - Rename Tab ✔️
> '' - Right Click - QF Commands - Remove From Category ✔️
> '' - Right Click - QF Commands - Tab Color - color ✔️❌ (2)
> '' - Right Click - '' - Set Tab Category ❌ (1)
> '' - Right Click - ''  - Remove Tab ✔️
> '' - Right Click - ''  - Insert / Remove Line Break ✔️
> '' - Right Click - '' - Insert / Remove Separator ✔️
> '' - Right Click - '' - Customize Icon ✔️
> '' - Right Click - '' - Remove Customized Icon ✔️
> '' - Right Click - Mail Folder Commands - Compact Folder ✔️
> '' - Right Click - Mail Folder Commands - Delete Folder ✔️
> '' - Right Click - .. - Repair Folder ✔️
> '' - Right Click - .. - Search Messages ✔️
> '' - Right Click - .. - Folder Properties ✔️
> '' - Right Click - .. - Explore Folder Location ✔️
> 
> QuickFolders Options Button -  only brings up menu on right click (main mouse
> handler is broken)
> Reading List Button - only works on right-click
> QuickJump button - context menu only shown on right-click. Not sure if by
> design.
> 
> 
> Right-Click + CTRL: Brings up the QuickFolders Commands Menu items, seems to
> react consistently with the same items above.
> 
> (1) in Debug mode I get:
> No emergency handler for this event type.
> (2) only when the menu was "persistent", in this case maybe 25% of the time. I
> also found that sometimes the correct color was not set.. so this needs special
> investigation
> 
> I will do a separate test on 52.9 I fear that's more broken right now.
> 
Forgot - we need a test of all items on Current Folder button (middle toolbar)_
too.
------- Comment #20 From Axel Grude 2018-08-17 11:58:56 -------
Created an attachment (id=8520) [details]
4.11 prerelease 182

Fixed (Thunderbird 60): 
# Color selection commands.
# Set Category Command
# click handlers (for left click) on the toolbar buttons (QF Options, Reeading
List, quickJump button)

Known issues: Compact folder appears to be triggered twice, going to fix this
for the next prerelease
------- Comment #21 From Axel Grude 2018-08-18 14:55:34 -------
Created an attachment (id=8521) [details]
4.11 prerelease 184

Removed duplicates from remaining commands. Added strings for all
localisations.
------- Comment #22 From Keith Burton 2018-08-19 13:55:34 -------
Hi Axel

Thanks for your efforts with these updates.

Tested 4.11 prerelease 184 on Tb 60 (Win 7 Pro 64). Eight tabs in total, some
with no folders, some with several and one with loads of folders.
Apologies if I am missing something, but, missing menus seem little better
although sub menus - when you do get a menu to stick - seem more reliable
(albeit picky about mousing accuracy). BUT, that is only true using Flat Style,
any of the other tab types; Apple Pills, Native Tabs, Buttons and Toolbar
Buttons all appear to be good.

The one thing that is certain though, when using Flat Style, is that stopping
the pointer 1px onto the bottom of the tab IS reliable, every time (sub-menu
mousing accuracy not withstanding).

So, for me, a very workable workaround is to un-bling those tabs and put up
with Native ones for the time being...
------- Comment #23 From Axel Grude 2018-08-19 14:06:00 -------
(In reply to comment #22)
> Hi Axel
> 
> Thanks for your efforts with these updates.
> 
> Tested 4.11 prerelease 184 on Tb 60 (Win 7 Pro 64). Eight tabs in total, some
> 
> So, for me, a very workable workaround is to un-bling those tabs and put up
> with Native ones for the time being...
> 
Nice one, good find!

One more thing you may try: in about:config, set

extensions.quickfolders.debug.popupmenus.verticalOffset = 0

(You have to restart Thunderbird to make the setting work). To my great
surprise it improved the whole situation a lot. [It looks a little uglier as it
doubles up the border between tabs and menu, but I can live with this.]
------- Comment #24 From Axel Grude 2018-08-19 14:11:06 -------
One more important finding: 

when *changing* from the "default toolbars" setting back to the "flat style"
the error reoccurs. I have a very big hunch now that it is caused by
duplication of document nodes (e.g. same menu with same id is built twice)

All menus are built dynamically and I attempt to reuse them for performance
reasons. I think changing the theme creates duplicates - and they may well also
be contributing to the problem from the start... It's a little hard to prove as
their not so easy to find with inspector.
------- Comment #25 From Axel Grude 2018-08-29 03:22:20 -------
I did a bi-section of my own code to see what may be the trouble.

1) Thunderbird 60 seems to ignore all commands from context menus on the
toolbars in QF 4.10. However the same context menu on the current folder button
works
2) Menus appear to be more stable in 4.10 (they do not vanish)
3) I did replace the <oncommand="function()" /> attributes with event listeners
in order to fix the "jump to subfolder" commands, but menu jumpyness remains

In the old version 4.10 I compared the current folder menu & the toolbar menu
markup and found that all mennu, menuitem, menuseparator nodes etc. have the
attribute:
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

while both menus are built dynamically I never actually inject this attribute
but I bet this is a the root of the menu jumpynesss / non functioning problem.
I need to find out why / how this attribute got injected into the Current
Folder context menu (and why not on the toolbarbuttons).
------- Comment #26 From Axel Grude 2018-08-29 04:12:47 -------
Created an attachment (id=8522) [details]
4.11 prerelease 206

I believe I made it better here.

I injected the "privileged" attribute

xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

to all new menu elements (including separators / menu / menupopup elements).
Now it appears to me the menus finally do not inexplicably vanish anymore.
------- Comment #27 From Axel Grude 2018-08-29 04:26:55 -------
(In reply to comment #26)
> Created an attachment (id=8522) [details] [details]
> 4.11 prerelease 206
> 
> I believe I made it better here.
> 
> I injected the "privileged" attribute
> 
> xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
> 
> to all new menu elements (including separators / menu / menupopup elements).
> Now it appears to me the menus finally do not inexplicably vanish anymore.
> 

.. or at least for the first couple of times I use the popup menus. It appears
the longer I use the Add-on within a Thunderbird session, the more unreliable
the menus seem to become again... (I am back to one of my earlier theories of
garbage DOM objects and duplicate menus with same id confusing the DOM tree)
well, it was a start at least.
------- Comment #28 From Axel Grude 2018-08-29 04:34:18 -------
(In reply to comment #27)
> (In reply to comment #26)
> > Created an attachment (id=8522) [details] [details] [details]
> > 4.11 prerelease 206
> > 
> > I believe I made it better here.
> > 
> > I injected the "privileged" attribute
> > 
> > xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
> > 
> > to all new menu elements (including separators / menu / menupopup elements).
> > Now it appears to me the menus finally do not inexplicably vanish anymore.
> > 
> 
> .. or at least for the first couple of times I use the popup menus. It appears
> the longer I use the Add-on within a Thunderbird session, the more unreliable
> the menus seem to become again... (I am back to one of my earlier theories of
> garbage DOM objects and duplicate menus with same id confusing the DOM tree)
> well, it was a start at least.
> 

The plot thickens.. apparently the xmlns tags get removed by Thunderbird on the
"Non-working" menu items.
------- Comment #29 From Axel Grude 2018-08-29 11:48:24 -------
Created an attachment (id=8523) [details]
4.11 prerelease 212

Some of the code changes wheren't done in the right branch.

Anyway this one adds the previously mentioned XUL attribute to all menu
children.

I think there are still some performance problems, I want to get to a stage
where I do not re-create the menus from scratch every time a tab is
(right-)clicked; it would be rather better to only update the labels of any
existing (sub)foplder (to update unread count+status) and keep the existing
click handler. 

The problem with replacing the "oncommand" attribute with an event handler is
that  removal of the handlers is difficult without keeping a list of handlers
(you have to pass in the correct function instance when removing the handler,
which is technically hard to do, as I am closuring the function for every
subfolder)

I am pretty sure repeated use of the popup meenus now creates some performance 
issues and possibly memory holes as well. I may yet return to the old method
(adding oncommand handler attributes) if I can make it work in thunderbird 60.
The overall performance may be better as there is less active event handlers at
the same time.,

Alternatively I will look into handline the go to folder events from a shared
event handler on the button which should also get the strain on the system
down. It's just another major refactoring exercise...
------- Comment #30 From Axel Grude 2018-09-07 07:41:28 -------
Created an attachment (id=8525) [details]
4.11 prerelease 220

This version seems more stable - and contains 2 major changes:

Added 
  event.preventDefault();
  event.stopPropagation();
to where I add the contextmenu command listener.

Added a config setting
extensions.quickfolders.debug.popupmenus.isOnCommandAttr
to turn on the old "oncommand" attribute (default is false)
------- Comment #31 From Axel Grude 2018-09-20 10:11:14 -------
*** Bug 26585 has been marked as a duplicate of this bug. ***
------- Comment #32 From Axel Grude 2018-09-22 12:09:51 -------
Created an attachment (id=8528) [details]
4.11 prerelease 237
------- Comment #33 From Axel Grude 2018-09-22 12:15:51 -------
Created an attachment (id=8529) [details]
4.11 prerelease 237

These are mainly style channges for "flat-style" toolbar buttons. Apparently
the other themes (such as apple pills, native tabs, buttons) do not have the
menu probnlems, so I was looking for CSS rules that are specific to the "flat
style" toolbarbuttons

CSS CHANGES
- Removed "em-based" sizings in my CSS rules. I wanted the spacing within and
around the buttons depending on the (configurable) font sizes. I think this
*may* contribute to triggering the bug. These generate "decimal pixel values"
such as 1.5px and may contribute to problems with the new HTML engine of
Thunderbird.
- replaced border-bottom: none with border-bottom-width: 0
- Removed border-collapse: collapse; on hover.
------- Comment #34 From Axel Grude 2018-09-22 12:16:48 -------
(From update of attachment 8528 [details])
duplicated / early submission (comment was missing)
------- Comment #35 From Axel Grude 2018-09-24 08:29:05 -------
Created an attachment (id=8530) [details]
4.11 prerelease 242

Issues fixed:

1) the popup menu was triggered by (left) mouse click. this should only happen
if the tab is on the current folder. Otherwise it should only go to the folder.
Apparently the click event is somehow duplicate

2) the select colors functionality in options / bling my tab was broken

3) put spacer container "QuickFolders-Folders-Pane" back to push down tabs when
only one row of tabs is shown
------- Comment #36 From Axel Grude 2018-10-15 06:07:22 -------
*** Bug 26589 has been marked as a duplicate of this bug. ***
------- Comment #37 From Axel Grude 2018-10-16 05:20:45 -------
Fixed in 4.11, released on 16/10/2018

First Last Prev Next    No search results available