TypeError: "this.editor is null" in Seamonkey 2.14.1

The following code provokes a TypeError: "this.editor is null"
in Seamonkey 2.14.1 (User agent: Mozilla/5.0 (Windows NT 6.1;
rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1; Build
identifier: 20121129191119)

	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
	var name = "_feedback"
	var location = 'SendMail.aspx?subject=' + window.location
	window.open (location, name, features)}

yields :

	Timestamp: 14/12/2012 13:17:37
	Error: TypeError: this.editor is null
	Source File: chrome://navigator/content/urlbarBindings.xml
	Line: 104

The following is the referenced code :

      <field name="_formattingEnabled">true</field>

      <method name="_formatValue">
        <parameter name="formattingEnabled"/>
        <body><![CDATA[
          var controller = this.editor.selectionController;
          var selection = controller.getSelection(controller.SELECTION_URLSECONDARY);
          selection.removeAllRanges();
          if (!formattingEnabled)
            return;

          var textNode = this.editor.rootElement.firstChild;
          var value = textNode.textContent;

          var protocol = value.match(/^[a-z\d.+\-]+:(?=[^\d])/);
          if (protocol && !/^https?:|ftp:/.test(protocol[0]))
            return;
          var matchedURL = value.match(/^((?:[a-z]+:\/\/)?(?:[^\/]+@)?)(.+?)(?::\d+)?(?:\/|$)/);
          if (!matchedURL)
            return;

          var [, preDomain, domain] = matchedURL;
          var subDomain = "";
          // getBaseDomainFromHost doesn't recognize IPv6 literals in brackets as IPs (bug 667159)
          if (domain[0] != "[") {
            try {
              var baseDomain = Services.eTLD.getBaseDomainFromHost(domain);
              if (baseDomain != domain) {
                function dots(s) { return s.replace(/[^.]*/g, "").length; }
                var subSegments = dots(domain) - dots(baseDomain);
                subDomain = domain.match(new RegExp("(?:[^.]*\.){" + subSegments + "}"))[0];
              }
            } catch (e) {}
          }

          var startLength = preDomain.length + subDomain.length;
          if (startLength) {
            var startRange = document.createRange();
            startRange.setStart(textNode, 0);
            startRange.setEnd(textNode, startLength);
            selection.addRange(startRange);
          }

          var endLength = preDomain.length + domain.length;
          if (endLength < value.length) {
            var endRange = document.createRange();
            endRange.setStart(textNode, endLength);
            endRange.setEnd(textNode, value.length);
            selection.addRange(endRange);
          }
        ]]></body>
      </method>
0
Philip
12/14/2012 1:47:34 PM
mozilla.support.seamonkey 13345 articles. 0 followers. Post Follow

6 Replies
416 Views

Similar Articles

[PageSpeed] 55

On Fri, 14 Dec 2012 13:47:34 +0000, Philip TAYLOR wrote:
> The following code provokes a TypeError: "this.editor is null"
> in Seamonkey 2.14.1 (User agent: Mozilla/5.0 (Windows NT 6.1;
> rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1; Build
> identifier: 20121129191119)
> 
> 	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
> 	var name = "_feedback"
> 	var location = 'SendMail.aspx?subject=' + window.location
> 	window.open (location, name, features)}

Why do you think this code should work?

Phil

-- 
Philip Chee <philip@aleytys.pc.my>, <philip.chee@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
0
Philip
12/15/2012 3:58:20 AM

Philip Chee wrote:
> On Fri, 14 Dec 2012 13:47:34 +0000, Philip TAYLOR wrote:
>> The following code provokes a TypeError: "this.editor is null"
>> in Seamonkey 2.14.1 (User agent: Mozilla/5.0 (Windows NT 6.1;
>> rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1; Build
>> identifier: 20121129191119)
>>
>> 	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
>> 	var name = "_feedback"
>> 	var location = 'SendMail.aspx?subject=' + window.location
>> 	window.open (location, name, features)}
> 
> Why do you think this code should work?

The code does work, Phil, but triggers the reported error in addition.
Is there something in the code that would lead you to believe that it
should not work ?

Philip Taylor
0
Philip
12/15/2012 8:57:50 AM

Philip TAYLOR wrote:>
> Philip Chee wrote:

>> Why do you think this code should work?
>
> The code does work, Phil, but triggers the reported error in addition.
> Is there something in the code that would lead you to believe that it
> should not work ?

Incidentally, when the newly created window is closed, either using [X]
or through window.close () , it also triggers this diagnostic :

> Timestamp: 15/12/2012 09:08:17
> Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIControllers.removeController]
> Source File: chrome://navigator/content/urlbarBindings.xml
> Line: 62

Probably unrelated, but may be useful in tracking down what is going wrong.
Philip Taylor
0
Philip
12/15/2012 9:12:44 AM
On Sat, 15 Dec 2012 08:57:50 +0000, Philip TAYLOR wrote:
> 
> 
> Philip Chee wrote:
>> On Fri, 14 Dec 2012 13:47:34 +0000, Philip TAYLOR wrote:
>>> The following code provokes a TypeError: "this.editor is null"
>>> in Seamonkey 2.14.1 (User agent: Mozilla/5.0 (Windows NT 6.1;
>>> rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1; Build
>>> identifier: 20121129191119)
>>>
>>> 	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
>>> 	var name = "_feedback"
>>> 	var location = 'SendMail.aspx?subject=' + window.location
>>> 	window.open (location, name, features)}
>> 
>> Why do you think this code should work?
> 
> The code does work, Phil, but triggers the reported error in addition.
> Is there something in the code that would lead you to believe that it
> should not work ?

I see at least seven errors in the above code. Fortunately for you
Javascript is quite forgiving.

> Philip Taylor

Phil

-- 
Philip Chee <philip@aleytys.pc.my>, <philip.chee@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
0
Philip
12/15/2012 11:06:18 AM

Philip Chee wrote:
>>>> 	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
>>>> 	var name = "_feedback"
>>>> 	var location = 'SendMail.aspx?subject=' + window.location
>>>> 	window.open (location, name, features)}

> I see at least seven errors in the above code. Fortunately for you
> Javascript is quite forgiving.

I see one, which is the closing brace on the final line
(crept in during copy/paste/simplify -- I omitted the
try/catch part to simplify the code :  see real code
below) --  what are the other six that you see ?

Philip Taylor
--------
> 	function SendFeedback (SelectedText)
> 		{
> 			var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=840,height=480"
> 			var name = "_feedback"
> 			var location = '../SendMail.aspx?URL=' + window.location			
> 			if (SelectedText == "")
> 				{
> 				}
> 			else
> 				{
> 					location += "&SelectedText=" + Global.SelectedText
> 					// console.log ("Location : " + location)
> 				}
> 			try
> 				{window.open (location, name, features)}
> 			catch (exception)
> 				{alert ("Sorry, your browser cannot handle a selection of that length; " +
> 							"please make a shorter selection or use an alternative browser such as Seamonkey")}
> 			finally {}
> 		}


0
Philip
12/15/2012 11:34:49 AM
Re-sent : cannot trace any reply, and still keen to
learn the other six errors you have identified :
--------
Philip TAYLOR wrote:
> 
> 
> Philip Chee wrote:
>>>>> 	var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=480,height=320"
>>>>> 	var name = "_feedback"
>>>>> 	var location = 'SendMail.aspx?subject=' + window.location
>>>>> 	window.open (location, name, features)}
> 
>> I see at least seven errors in the above code. Fortunately for you
>> Javascript is quite forgiving.
> 
> I see one, which is the closing brace on the final line
> (crept in during copy/paste/simplify -- I omitted the
> try/catch part to simplify the code :  see real code
> below) --  what are the other six that you see ?
> 
> Philip Taylor
> --------
>> 	function SendFeedback (SelectedText)
>> 		{
>> 			var features = "menubar=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=840,height=480"
>> 			var name = "_feedback"
>> 			var location = '../SendMail.aspx?URL=' + window.location			
>> 			if (SelectedText == "")
>> 				{
>> 				}
>> 			else
>> 				{
>> 					location += "&SelectedText=" + Global.SelectedText
>> 					// console.log ("Location : " + location)
>> 				}
>> 			try
>> 				{window.open (location, name, features)}
>> 			catch (exception)
>> 				{alert ("Sorry, your browser cannot handle a selection of that length; " +
>> 							"please make a shorter selection or use an alternative browser such as Seamonkey")}
>> 			finally {}
>> 		}
0
Philip
12/17/2012 9:03:36 PM
Reply:

Similar Artilces:

Seamonkey 2.3.1 : can I turn off "Seamonkey Instant"
Having finally succeeded in turning off Google Instant and Google Autocomplete by setting my home page to : http://www.google.co.uk/webhp?complete=0 I am now being driven to distraction by Seamonkey's "Find" behaviour (from Ctrl-F) seeking to emulate the abominable Google Instant. Is there any of reverting Find's behaviour to its former line- oriented behaviour whereby it used to wait to be told what to search for (by hitting <return>) rather than trying to be ´┐Żber-clever and guess from the characters already typed ? Philip Taylor Philip TAYLOR (Web...

Seamonkey mail (2.5) : "Bcc: " -> "To: "
A user is trying to Bcc a large list of contacts. He brings up the compose window and the address book, sets the first recipient field to "Bcc: " and drags the first entry from the address book to this field. As he continues to drag entries to subsequent recipient fields, all follow the first in pattern (i.e., "Bcc: ") until there is room for only one more entry above the divider bar. As he drags an entry into this recipient field, the whole thing scrolls up one line, and a new recipient field is added. This one defaults to "To: ". Why ? Philip T...

Bug in "Most Visited" Seamonkey 2.10.1
When I first start Seamonkey, the Most Visited bookmarks are as expected. Immediately after selecting any of them and then looking again at the list, every entry is shown twice. Is this a known bug and what can be done to fix it? Robert Gault wrote: > Immediately after selecting any of them and then looking again > at the list, every entry is shown twice. > > Is this a known bug and what can be done to fix it? That would be <https://bugzilla.mozilla.org/show_bug.cgi?id=765689>. Regards ...

"SeaMonkey and "Lightning"????
Another question : Can "Lightning Calendar" work with "SeaMonkey"??? Best Regards @lex Alex Beauroy wrote: > Another question : Can "Lightning Calendar" work with "SeaMonkey"??? Not yet, but we'll be trying to make SeaMonkey 2.0 and Lightning 1.0 compatible with each other (actually, I have some development code around here that makes it mostly work). Robert Kaiser Please don't post your question more than once. ...

superreview requested: [Bug 302695] Misleading message when starting Thunderbird in "Ask for Online state" mode
timeless@gmail.com <timeless@bemail.org> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@bluebottle.com> for superreview: Bug 302695: Misleading message when starting Thunderbird in "Ask for Online state" mode - there is no "File -> Work Online" https://bugzilla.mozilla.org/show_bug.cgi?id=302695 Attachment 205036: Patch v.2 (SeaMonkey) https://bugzilla.mozilla.org/attachment.cgi?id=205036&action=edit ...

superreview denied: [Bug 93390] [RFE]"Block images from this server" should identify "this server" : [Attachment 307048] SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2
neil@parkwaycc.co.uk <neil@httl.net> has denied zug_treno@yahoo.com's reque= st for superreview: Bug 93390: [RFE]"Block images from this server" should identify "this serve= r" https://bugzilla.mozilla.org/show_bug.cgi?id=3D93390 Attachment 307048: SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2 https://bugzilla.mozilla.org/attachment.cgi?id=3D307048&action=3Dedit ------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net> >+ if (scheme =3D=3D "file") {=0D >+ serverLabel =3D "localhost&qu...

superreview requested: [Bug 93390] [RFE]"Block images from this server" should identify "this server" : [Attachment 307048] SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2
zug_treno@yahoo.com has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 93390: [RFE]"Block images from this server" should identify "this server" https://bugzilla.mozilla.org/show_bug.cgi?id=93390 Attachment 307048: SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2 https://bugzilla.mozilla.org/attachment.cgi?id=307048&action=edit ...

SeaMonkey 1.1 publishing "rv:1.8.1.2pre" in user-agent string
Name: J.D. Morgan Email: jdmorgan56atyahoodotcom Product: SeaMonkey Summary: SeaMonkey 1.1 publishing "rv:1.8.1.2pre" in user-agent string Comments: The new SeaMonkey 1.1 release is publishing "rv:1.8.1.2pre" in its user-agent string. This may or may not be expected by the team, but I did not expect to see a "pre" (preliminary or pre-release version?) tag on the end of the revision number. This tripped a security script on one of my sites that does (very) strict user-agent validation. So, this is an FYI; Ignore it if this was expected. Tha...

superreview canceled: [Bug 93390] [RFE]"Block images from this server" should identify "this server" : [Attachment 310268] SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2.5
zug_treno@yahoo.com has canceled zug_treno@yahoo.com's request for superreview: Bug 93390: [RFE]"Block images from this server" should identify "this server" https://bugzilla.mozilla.org/show_bug.cgi?id=93390 Attachment 310268: SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2.5 https://bugzilla.mozilla.org/attachment.cgi?id=310268&action=edit ------- Additional Comments from zug_treno@yahoo.com (In reply to comment #40) > I don't like this. I think we should hide the menuitems if we can't get a > host. OK, the menuitems aren&...

superreview requested: [Bug 93390] [RFE]"Block images from this server" should identify "this server" : [Attachment 310268] SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2.5
zug_treno@yahoo.com has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 93390: [RFE]"Block images from this server" should identify "this serve= r" https://bugzilla.mozilla.org/show_bug.cgi?id=3D93390 Attachment 310268: SeaMonkey 2.0a1pre version of Mogens Isager's patch v.2.5 https://bugzilla.mozilla.org/attachment.cgi?id=3D310268&action=3Dedit ------- Additional Comments from zug_treno@yahoo.com (In reply to comment #40)=0D > I don't like this. I think we should hide the menuitems if we can't get a= =0D > host.=0...

SeaMonkey 1.1.18 vs SeaMonkey 2.1 (if/when 2.1 is released)
I will clearly state that I am not a computer whiz...thus, I have a number of concerns regarding SeaMonkey 2.0 installation on my system. I have been reading the many SeaMonkey 2.0 messages on this newsgroup with some concern about my ability to fix the problems that could occur with the installation of 2.0. It seems that the move from 1.1.18 to 2.0 is not happening without a number of glitches along the way. Thus, in light of what I have read, I am wondering if it would wise for me to wait for a future release of SeaMonkey before upgrading my system...I suppose I am hoping tha...

"m.s.seamonkey " vs. n.p.m.seamonkey" forums??
How does this forum differ from "netscape.public.mozilla.seamonkey"-forum? Why is there to on the apparently same application? _Trombastic_ spoke thusly on 26/04/2006 12:26 PM: > How does this forum differ from "netscape.public.mozilla.seamonkey"-forum? > > Why is there to on the apparently same application? When the Mozilla project began, it was created by Netscape as a development project, with no intent to market 'Mozilla' to end-users. Newsgroups were created in the netscape.public.* hierarchy, for Mozilla contributors. 'Seamonkey&...

Difference between passing "?" versus ":1", ":2", ":3" etc in prepare in Perl DBI !
------=_Part_26521_25854351.1225691891708 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi What's the difference between passing "?" versus ":1", ":2", ":3" etc in prepare in Perl DBI ? For example, what's the difference between following two scenarios :- *Scenario 1* $sth = $dbh->prepare("insert into tablename values (:1, :2, :3)"); $sth->execute($var1,$var2,$var3); *Scenario 2* $sth = $dbh->prepare("insert into tablename values (?, ?, ...

ADSIImport for users retrieves from AD "\" + firstName" + " " + lastName as Username (ver 2.1.2)
Hi, I've installed both TTTASDIAdmin and ASDIImport and they both seem to run well. I have a problem with importing users from an Active Directory of a subdomain (win2k server). Instead of getting the username as well as other details, all I get is: First Name: firstName" + " " + lastName Last Name: (empty) Username: "\" + firstName" + " " + lastName email: firstName" + " " + lastName +@myMailserver.org.au (reads the mail server from ASDI setting) My ASDI setting are: Win Authentication RootDomain: subDomain.Do...

Web resources about - TypeError: "this.editor is null" in Seamonkey 2.14.1 - mozilla.support.seamonkey

Resources last updated: 12/11/2015 2:02:04 PM