cypht-org / cypht

Cypht: Lightweight Open Source webmail aggregator [PHP, JS]. Supports IMAP/SMTP, JMAP and soon EWS
http://cypht.org
GNU Lesser General Public License v2.1
1.01k stars 164 forks source link

Move button without functionality in 50% of the cases #1368

Open ulfgebhardt opened 6 days ago

ulfgebhardt commented 6 days ago

🐛 Bugreport

Move button without functionality in 50% of the cases

It happens very often, when selecting an email the move button is correctly shown, but has no functionality. This seems to be click handler register issue.

image

Version & Environment

Rev: [v2.4.0]

OS: [chromium, alpine]

Steps to reproduce

  1. Mark Mail
  2. Click Move Button
  3. Nothing happens in ~25-50% of the cases
  4. ...
  5. Profit
mercihabam commented 4 days ago

The move button works perfectly fine. @ulfgebhardt could you please share the details of your device and/or browser?

ulfgebhardt commented 4 days ago

image

Its definitely reproducable for me - sometimes it takes a while - sometimes i have it very often.

The effect is, that no Move-Menu is opened. This looks like a race-condition when registering the click handler.

This also applies to the copy button (not sure if always)

ulfgebhardt commented 4 days ago

Further debug info:

If this happens the classes of the move button (an <a>) do not change.

Normal behaviour:

  1. No message selected (invisible): imap_move btn btn-sm btn-secondary no_mobile disabled_input
  2. Selecting a message (clickable): imap_move btn btn-sm btn-secondary no_mobile
  3. Deselecting the message (invisible): imap_move btn btn-sm btn-secondary no_mobile disabled_input

Error case:

  1. No message selected (invisible): imap_move btn btn-sm btn-secondary no_mobile disabled_input
  2. Selecting a message (unclickable): imap_move btn btn-sm btn-secondary no_mobile disabled_input
  3. Deselecting the message (invisible): imap_move btn btn-sm btn-secondary no_mobile disabled_input

Removing the class disabled_input manually does not make the button clickable

mercihabam commented 4 days ago

Let's try to solve this. Please share with me the value of the id attribute for the checked box of a message.

ulfgebhardt commented 4 days ago

Same mailbox, two buttons

<td class="checkbox_cell"><input id="imap_6738e4f407104_5130_494e424f58" type="checkbox" value="imap_6738e4f407104_5130_494e424f58"><label class="checkbox_label" for="imap_6738e4f407104_5130_494e424f58"></label></td>
<td class="checkbox_cell"><input id="imap_6738e4f407104_5129_494e424f58" type="checkbox" value="imap_6738e4f407104_5129_494e424f58"><label class="checkbox_label" for="imap_6738e4f407104_5129_494e424f58"></label></td>

The problem can be forced by clicking the same button several times quickly

I have not figured out yet if this could be related to a silent background update happening at the same time - maybe a test could be to increase the refresh rate to every second and see if that is causing it.

mercihabam commented 3 days ago

Sorry, @ulfgebhardt I never came across the mentioned issue. Let's see if others operating on the same architecture as you experience this problem.

mercihabam commented 3 days ago

@IrAlfred @Baraka24 Please try and see if this issue is reproducible. Thanks!

mercihabam commented 10 minutes ago

@Baraka24 @IrAlfred, could you please provide your feedback? Did you follow the steps detailed by @ulfgebhardt and reproduce the issue?