RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.79k stars 10.23k forks source link

Incorrect data-state #19462

Open everlasting-neverness opened 3 years ago

everlasting-neverness commented 3 years ago

Description:

Hello! I found a bug with an incorrect data-state on rocketchat-widget div.

Steps to reproduce:

  1. When the page with rocketchat is loaded open it up. In localStorage there will be next values:
    minimized: false
    undocked: false
    visible: true
  2. Press "Expand chat" button. Values in LS:
    minimized: false
    undocked: true
    visible: true
  3. Close opened window with chat. Values in LS:
    minimized: false
    undocked: true
    visible: true
  4. Reload the page with F5. Values in LS:
    minimized: false
    undocked: true
    visible: true

Expected behavior:

After "Expand chat" button click "minimized" attr in LS should be set to true. So div with class "rocketchat-widget" should not update it's data-state attr with "opened" value.

Actual behavior:

After page reload rocketchat-widget div updates it's data-state attr with 'opened' value. I suppose it's because of minimized: false value in localStorage. It causes an overlap of some part of the page with an invisible rocketchat-widget div.

Server Setup Information:

Client Setup Information

gaoyangz77 commented 3 years ago

same +1