zhakui / wmd

0 stars 0 forks source link

Javascript Error when editor is not visible #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I use the editor on a div with multiple tabs (also divs). When the tab with the 
editor is invisible then 
every few milliseconds you get an JS error ("null value").

Debugging a packed JS file is not very practical, so I cannot see where the 
error occurs.

BTW I could really use the un-packed JS files of WMD. When will you upload them?

Thanx, Bart

Original issue reported on code.google.com by bartb...@gmail.com on 29 Jul 2008 at 11:07

GoogleCodeExporter commented 9 years ago
I should add: the visibility of the div is done with CSS.

Original comment by bartb...@gmail.com on 30 Jul 2008 at 9:43

GoogleCodeExporter commented 9 years ago
I have same error, which occurs in wmd-base.js line 475

7.setTop=function(6f, 70, 71){
    var _72=_7.getPixelVal(_6f.style.top);
...

}

Uncaught TypeError: Cannot read property 'style' of null

Occurs while using jQuery Tabs, when WMD is on a hidden tab.

Original comment by carbonro...@gmail.com on 7 May 2010 at 3:57

GoogleCodeExporter commented 9 years ago
Same error, please fix...

Original comment by andrea.salicetti@gmail.com on 23 Jul 2010 at 7:28

GoogleCodeExporter commented 9 years ago
Same problem at line 561: 
Error: uncaught exception: [Exception... "Component returned failure code: 
0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]"  
nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: 
/wmd-1.0.1/wmd/wmd-base.js :: anonymous :: line 561"  data: no]

Original comment by mom2ma...@gmail.com on 15 Aug 2010 at 6:09

GoogleCodeExporter commented 9 years ago
I'm experiencing the same error.  The following error messages are repeated in 
a seemingly infinite loop.

This is from firebug in Firefox 3.6.8

First:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 
(NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: 
"0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: 
http://localhost:3000/javascripts/wmd/wmd-base.js :: anonymous :: line 565" 
data: no]

Second:
[Break on this error] (no source for )
_6f is null
[Break on this error] var _72=_7.getPixelVal(_6f.style.top); 

Background:
My WMD include tag is nestled right against the closing body tag.  
I'm on OS X 10.6.4
Firefox 3.6.8

Context:
I experience the error when I use unobtrusive javascript to update the form 
container that holds my  WMD text field.

Original comment by dmcaler...@gmail.com on 26 Aug 2010 at 2:53

GoogleCodeExporter commented 9 years ago
I get this error when I do not use the wmd library correctly. If the wmd editor 
is hidden when you load the page, then you need to add the following line 
BEFORE you load the wmd script: 

wmd_options = { autostart: false };

I recall there is something in the docs about it.

Original comment by Iain.Rob...@gmail.com on 9 Oct 2010 at 4:46