FiltaQuilla icon indicating copy to clipboard operation
FiltaQuilla copied to clipboard

Javascript action editor doesn't work in TB91.1.1

Open sunsolve opened this issue 5 years ago • 12 comments

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.

sunsolve avatar Sep 26 '21 05:09 sunsolve

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?

RealRaven2000 avatar Sep 26 '21 08:09 RealRaven2000

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

sunsolve avatar Sep 28 '21 02:09 sunsolve

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.

RealRaven2000 avatar Sep 28 '21 09:09 RealRaven2000

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

kupietools avatar Oct 03 '21 05:10 kupietools

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.

RealRaven2000 avatar Oct 07 '21 11:10 RealRaven2000

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

kupietools avatar Oct 09 '21 00:10 kupietools

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?

RealRaven2000 avatar Oct 09 '21 13:10 RealRaven2000

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.

kupietools avatar Oct 10 '21 11:10 kupietools

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).

mook-as avatar Oct 18 '21 15:10 mook-as

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

kupietools avatar Oct 18 '21 16:10 kupietools

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 avatar Oct 26 '21 21:10 kupietools

This is fixed in TB update 91.3.0, released today.

kupietools avatar Nov 03 '21 03:11 kupietools