Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Partially out-of-view window jumps and changes position when handle is touched

クローズ
#742 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
frontend

調査の方向性

Start by creating a minimal reproduction of a partially out-of-view window using the draggable component inside a scrolling parent. Compare the window position and parent scroll state before and after touching the title handle, using the reported onDragStop workaround as a reference. Done means the window does not jump, unexpectedly scroll into view, or change position relative to its peers.

索引モデルが issue の本文から書いたものです。

説明

Hi, I'm making a windowing system (for which, thanks for your utility).

But there's something odd. When I click on the title (which is the handle) of the pictured window, then it jumps fully into view (by scrolling the parent), and also changes its top/left co-ordinates (moving it away from its peers).

I've had to compensate by adding the following code to the onStop method (note the reversal of the deltaY values, and the counter-scroll operation):

const onDragStop = (e, data) => {

        if (data.deltaY) {
            panelFrameElementRef.current.scrollTop -= data.deltaY
        }

        setWindowConfigSpecs((oldState) => {
            return {...oldState, top:data.y - data.deltaY, left: data.x}
        })

}

Any suggestions?

Screenshot 2024-03-16 at 8 19 15 AM
主要言語
JavaScript
スター
9.3k
フォーク
1k
平均マージ
2日 16時間
マージ済み PR(30日)
5

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-grid-layout/react-draggable のほかの issue

react-grid-layout/react-draggable の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。