Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebug and _moz_dirty

I am developing Javascript app that will wrap every line of text entered inside iframe (designmode) with P (or div) like it happens by default in IE.

For now I am not pasting my code because I just started, the first problem is when i type some text in firefox and even before I click enter or calling any function firebug inserts

<br _moz_dirty="">

under the entered text.

Why? How can I prevent it?

If you still need my code please tell.

like image 334
shivesh Avatar asked Dec 27 '25 15:12

shivesh


2 Answers

As the _moz_-prefix suggests, this is a Mozilla-internal property. It isn't inserted by Firebug, but rather by the core editor functionality in Gecko. You can't prevent it; ignore it or work around it.

like image 135
Ms2ger Avatar answered Dec 31 '25 17:12

Ms2ger


#myEditableDiv br {display:none;}

It's something Mozilla uses to prevent empty containers collapsing and occasionally inserts at seemingly random times too.

The question is, if they knew it was a dirty hack then why did they do it?

like image 23
Mattyod Avatar answered Dec 31 '25 19:12

Mattyod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!