Prompt background does not disappear after 2nd try
- Linguagem predominante
- JavaScript
- Estrelas
- 0
- Forks
- 0
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
```
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)
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
O bug está em Markdown.Editor.js linha 1684, onde uma chamada a removeChild falha. Comece examinando o tratamento de wmd-prompt-background nesse arquivo, especialmente em torno do clique no image button e da lógica de callback. Reproduza a issue acionando o image button duas vezes e verificando o estado do DOM. O fix provavelmente envolve garantir que o background element esteja referenciado corretamente antes da remoção.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript
- Domínio
- frontend
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 45/100