prefers-reduced-motion: reduce causes crash in custom dialogs if reopened quickly
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
報告された行の src/js/dialog/transition.js から始め、transitions を無効にするか prefers-reduced-motion を有効にした状態で jsfiddle のシナリオを再現します。closeEvent.cancel を設定した状態で open、close、destroy、reopen の呼び出しを素早く実行します。undefined の dialog 内部にアクセスしたりクラッシュしたりせずにシーケンスが完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Whether you set alertify.defaults.transitionOff = true, alertify.defaults.transition = null or use chromium devtools to "Emulate CSS prefers-reduced-motion: reduce" (by using the command palette, Ctrl+Shift+P) all these result in the same crash.
I have reproduced the issue in a jsfiddle here: https://jsfiddle.net/m9o3sed0/8/
Video from jsfiddle reproduction
The crash happens when opening, closing and reopening the dialog in quick succession (like an automated browser test). It doesn't happen unless transitions/animations are somehow disabled.
It also doesn't happen unless you set closeEvent.cancel = true (like in the jsfiddle) and use .destroy() to close it instead.
The crash happens here (it might be a little annoying to get a stack trace from jsfiddle, but you should be able to do it in devtools):
https://github.com/MohammadYounes/AlertifyJS/blob/8dde6f105c62fa144b7bffd3377401e4b843b9b8/src/js/dialog/transition.js#L11
Because instance.__internal === undefined.
The use case for calling .destroy() in this manner instead of letting the default behaviour (close event?) close the dialog is that we want to open another nested dialog and wait for that one to .destroy() the first one.
This bug is reproducible all the way back to alertify v1.5.0, when .destroy() was introduced.
- 主要言語
- JavaScript
- スター
- 2.1k
- フォーク
- 291
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MohammadYounes/AlertifyJS のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
MohammadYounes/AlertifyJS#278 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
MohammadYounes/AlertifyJS#277 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
MohammadYounes/AlertifyJS#276 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
MohammadYounes/AlertifyJS#275 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
MohammadYounes/AlertifyJS#265 ·
MohammadYounes/AlertifyJS の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
swc-project/swc-ai-issues#414 ·
-
[workshop-sim] Repair: Make Copilot access and billing path decision self-contained in Steps 07/07dオープンfeedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
githubnext/gh-aw-workshop#5597 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
swagger-api/swagger-client#4318 ·
メンテナーはふだん 1 日以内に返信
-
Add: Film Mania PLオープンcheck:passed feeds:add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Disabled radio toggle button groups lose checked state対応中かも @vladosskins178 が今日担当しました。 オープンbug confirmed css has-pr v6
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信