Run panel position is wrong! #4459

Closed
opened 2026-02-21 18:06:32 -05:00 by yindo · 1 comment
Owner

Originally created by @aixgeek on GitHub (Jul 4, 2024).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

Add multi outputs in panel and scroll panel
Click run button,the run panel position is wrong.

✔️ Expected Behavior

image

Actual Behavior

image

image

Originally created by @aixgeek on GitHub (Jul 4, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.11 ### Cloud or Self Hosted Cloud, Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce Add multi outputs in panel and scroll panel Click run button,the run panel position is wrong. ### ✔️ Expected Behavior ![image](https://github.com/langgenius/dify/assets/9697715/2b004114-56ba-415b-88e1-8f829ec77189) ### ❌ Actual Behavior ![image](https://github.com/langgenius/dify/assets/9697715/029d7b55-745a-471a-9810-91b3e7d4d928) ![image](https://github.com/langgenius/dify/assets/9697715/3f8c922b-b0fe-4718-8a64-382eec57ca0c)
yindo added the 🐞 bug label 2026-02-21 18:06:32 -05:00
yindo closed this issue 2026-02-21 18:06:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 4, 2024):

To fix the issue where the run panel appears in the wrong position after adding multiple outputs and scrolling the panel in the Dify application, you need to ensure that the height of the panel is adjusted correctly when the content changes.

In the provided code, the adjustResultHeight function is responsible for setting the height of the panel. However, it is only called in the useEffect hook that depends on the loading state. You should also call this function whenever the content of the panel changes.

You can achieve this by adding a dependency on runDetail in the useEffect hook that calls adjustResultHeight. Here is the modified code:

useEffect(() => {
  adjustResultHeight()
}, [loading, runDetail])

This ensures that the height is adjusted whenever the runDetail changes, which should fix the issue with the panel appearing in the wrong position.

Here is the updated part of the code:

useEffect(() => {
  adjustResultHeight()
}, [loading, runDetail])

This change should ensure that the panel height is recalculated whenever the content changes, thus fixing the positioning issue [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jul 4, 2024): <!-- Answer --> To fix the issue where the run panel appears in the wrong position after adding multiple outputs and scrolling the panel in the Dify application, you need to ensure that the height of the panel is adjusted correctly when the content changes. In the provided code, the `adjustResultHeight` function is responsible for setting the height of the panel. However, it is only called in the `useEffect` hook that depends on the `loading` state. You should also call this function whenever the content of the panel changes. You can achieve this by adding a dependency on `runDetail` in the `useEffect` hook that calls `adjustResultHeight`. Here is the modified code: ```tsx useEffect(() => { adjustResultHeight() }, [loading, runDetail]) ``` This ensures that the height is adjusted whenever the `runDetail` changes, which should fix the issue with the panel appearing in the wrong position. Here is the updated part of the code: ```tsx useEffect(() => { adjustResultHeight() }, [loading, runDetail]) ``` This change should ensure that the panel height is recalculated whenever the content changes, thus fixing the positioning issue <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/run/index.tsx)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/code/panel.tsx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4459