Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

Strange behavior of drop-down menu elements #732

Closed ivictor777 closed 6 months ago

ivictor777 commented 11 months ago

Hello, I have drop-down menu items and I've noticed some strange behavior. On localhost everything works as expected, but on any other domain when I click on the text or icon, nothing happens, it only works when I click outside the icon or text or on the arrow. Could you please fix this?

pxpm commented 11 months ago

Hey @ivictor777 thanks for the report ๐Ÿ™

Can you provide a little bit more detail ? What theme are you using, and what version is it on ?

You can check Backpack packages installed version with: php artisan backpack:version

Let me know, cheers.

ivictor777 commented 11 months ago

@pxpm

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.2.1 backpack/crud: 6.3.0 backpack/generators: v4.0.2 backpack/permissionmanager: 7.1.1 backpack/pro: 2.0.18 backpack/theme-coreuiv2: 1.2.2

tabacitu commented 11 months ago

Hmm that's very odd @ivictor777 .

  1. Let's see if it's a browser problem. Can you please also test in our online demo - https://demo.backpackforlaravel.com/admin/dashboard (make sure you select the CoreUIv2 theme by clicking the palette icon in the top-right corner). Does it happen there too?

  2. I don't quite understand what you meant by "it only works when I click outside the icon or text or on the arrow. ". Let's detail the behaviour a bit. In my test:

    • hover over icon, text or arrow - item gets highlighted
    • click text or arrow - dropdown gets expanded

So I did notice one tiny bug: in dropdowns, cannot click the icon to expand/contract. I click, but it does not expand/contract. CleanShot 2023-11-07 at 11 46 17

Is this what you mean?

ivictor777 commented 11 months ago

@tabacitu

  1. On your demo everything works correctly for me, just like for you.
  2. List does not open when I click on the text. This happens when backpack is installed on a domain or IP other than 127.0.0.1. I have no idea why this is so, I have one version of backpack installed everywhere and this is one project.
tabacitu commented 11 months ago

Pfiew! So the problem is limited to your app.

Any errors in the Chrome DevTools, under Console? I suspect you have some JS errors onpage that prevent the sidebar JS from working. Or maybe your HTTP/HTTPS is misconfigured somehow, and you get errors that prevent JS from working?

ivictor777 commented 11 months ago

@tabacitu I have 1 error on 127.0.0.1 (where clicking on text works correctly)

Screenshot 2023-11-08 at 6 20 58 PM

On server ip with http and domain with https no errors, but dropdowns not expands...

tabacitu commented 10 months ago

Hmm that's weird. Since it works on localhost but not in production, I am almost certain it's not something we Backpack can fix, but a misconfiguration on your end. So please investigate a bit more. Here are a few more shots in the dark, that might help you:

  1. Are you sure your .ENV file is properly configured in production? Maybe your APP_URL isn't properly set?
  2. Are you using the website under a different port?
  3. If you run php artisan basset:check in production, do you get all green, that everything is configured correctly?

Cheers!

ivictor777 commented 10 months ago

@tabacitu

  1. APP_URL setting is set correctly
  2. I'm not sure I understood the question correctly. I don't have a website, I only have a database with an admin panel.
  3. All green
ivictor777 commented 6 months ago

I donโ€™t know exactly after what, but the problem went away

tabacitu commented 6 months ago

Haha isn't web dev life beautiful? ๐Ÿ˜… You do nothing, yet things get fixed.

Awesome, let's close this then, since we have no chance of understanding what went wrong at this point.