6174 / 6174/pagedown

Prompt background does not disappear after 2nd try

未關閉
#31 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
auto-migrated Priority-Medium Type-Defect
主要語言
JavaScript
星號
0
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

```
When clicking the image button, the wmd-prompt-background appears. If the image
insert is canceled using callback(null); in JavaScript, then the background
disappears. However, if the user clicks the image button again, the
wmd-prompt-background will appear again, but whether callback(null); or
callback("http://someurlhere.com/photo.jpg"); is used, the background will not
disappear.

The JavaScript Console shows at this time "Uncaught TypeError: Cannot call
method 'removeChild' of null" in Markdown.Editor.js line 1684.

I have attached the trace that the browser's console provides. The browser
version is Google Chrome 20.0.1132.57 m on Windows XP.
```

Original issue reported on code.google.com by `johngti...@gmail.com` on 25 Jul 2012 at 11:06

Attachments:
- [trace.txt](https://storage.googleapis.com/google-code-attachments/pagedown/issue-31/comment-0/trace.txt)

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

這個 bug 位於 Markdown.Editor.js 第 1684 行,其中一次 removeChild 呼叫失敗。先檢查該檔案中對 wmd-prompt-background 的處理,特別是 image button 點擊和 callback 邏輯周邊。透過觸發 image button 兩次並檢查 DOM 狀態來重現該 issue。修復很可能涉及確保 background element 在移除前已被正確參照。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。