bigskysoftware / bigskysoftware/_hyperscript
Calling show on a visible element modifies the display type to block, despite it being flex
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 171
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I encountered some unwanted behavior when using show/hide to filter a list of elements specifying _display:flex_.
When calling the correct sequence everything works OK. So calling _hide_ first seems to register the original display type before setting _display:none_. Then after calling _show_, _display:flex_ is restored.
Calling _show_ on an element that is already visible causes the display type to change to _block_. And it never reverts to _flex_ in my case. This causes undesired changes to the layout. Ideally this method should have no effect in this case.
I've worked around this to make sure _show_ is never called on visible elements, but I think this should be default behavior.
PS. The docs state that show/hide switches between none and block. But this is obviously not the case since it also switches to flex.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず show/hide の実装を見つけ、display が flex である要素で報告された一連の操作を再現します。すでに表示されている要素に対して show を呼び出してもその display タイプが変更されないことを確認し、既存の hide-then-show の動作では引き続き flex が復元されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100