RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Javascript action editor doesn't work in TB91.1.1 #124

Closed sunsolve closed 2 years ago

sunsolve commented 3 years ago

os: mac 10.15.7 tb version: 91.1.1

  1. open message filters dialog and create a new filter by using javascript action.
  2. If you click [ edit javascript ] and fill the editor with some code, and click [ok] , the message filter dialog will hangup and you have to restart thunderbird.
  3. After thunderbird restarted, there have no filter you just created, that's say creating filter failed.

I tested on windows , no such issue.

RealRaven2000 commented 3 years ago

Thanks for submitting this. Unfortunately I own no Mac hardware for testing, so the only way I could investigate this is either by JavaScript error console or maybe a Teamviewer session to reproduce on your Computer. Can you open JavaScript error console from Tools / Web Developer and see if there are any error messages when this happens?

sunsolve commented 3 years ago

sorry, there have no any error info in javascript console. image

by the way, I found that the message filter dialog will hangup once you open the javascript editor, whether you click OK or cancel.

Another issue, Because I can't use javascript editor, I try to copy&paster code from other text editor to input field without open javascript editor, all CR/LF were substituted by a comma

image

RealRaven2000 commented 3 years ago

I think the best way forward would be a remote debugging session, can you use Teamviewer / Zoom on Mac? You can contact me directly via email to arrange an appointment.

kupietools commented 3 years ago

Any status update with this? I'd be happy to do a remove share with you if he wasn't able to. I came here to post the exact same things. Here's some additional screenshots to illustrate. As soon as you click to open the multiline javascript editor, the filter editor window behind it disappears:

image

The when you cancel or save that, the Filters window suddenly loses all interactivity, and you're stuck back in a frozen, non-interactive Filters window. Note no window title, or close/minimize/maximize buttons:

image

The only thing you can do to resume editing filters at that point is quit TB and reopen it.

And, yes, I have the same problem with pasting into the one-line javascript entry field... it replaces all my carriage returns or sometimes even double-spaces with commas so the script breaks entirely unless I run it through a text processor to remove all extraneous characters and paste it in as a huge run-on line of code, which I then have to detangle next time I want to debug. It's a bit of a pain.

UPDATE: I wonder if this is related to this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1715740

RealRaven2000 commented 3 years ago

Try this version - the onAccept function was wired up twice maybe it had an effect:

filtaquilla-3.2.1pre4.zip

To install, simply download the zip file and drag into Thunderbird Add-ons manager.

kupietools commented 3 years ago

Thanks for the update... sorry, it doesn't fix the issue for me. TB 91.2.0

RealRaven2000 commented 3 years ago

Thanks for the update... sorry, it doesn't fix the issue for me. TB 91.2.0

thanks for testing, I thought it was worth a shot. Next step would be remote debugging, what's a good day for you?

kupietools commented 3 years ago

I'm pretty much available after about 1:30 pm Pacific time thru late into the night, 7 days a week. The only exception is I have a meeting Tuesday at 2PM for a couple hours.

Before we go to the trouble though, did you look at that Bugzilla issue I linked above to see if it's connected? Just want to make sure you didn't miss that.

mook-as commented 3 years ago

Hi there! I'm also seeing this.

I believe this is because there's a limitation on Mac on how many layers of nested dialogs are allowed; if you have something like 3 or more, Cocoa breaks. So I believe in this case the issue should go away if the script editor opens a (non-modal) window instead. This of course would be annoying for you to change (since things are no longer modal).

(Note that this is based on vaguely remembered bugs I saw a decade ago, so this may be incorrect… sorry about that.)

Possibly related: bug 451379 (which says modal isn't the issue, it's using multiple sheets).

kupietools commented 3 years ago

That doesn't seem likely to me, since this same functionality worked just fine on Mac before TB was upgraded to v91.

kupietools commented 3 years ago

This is pretty clearly a TB bug, it's causing problems in other addons. One of the devs posted a custom nightly TB build that fixes it in the Bugzilla report thread, so hopefully it'll be fixed in the main TB build soon.

kupietools commented 3 years ago

This is fixed in TB update 91.3.0, released today.