FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Automatic link creation (with description) not working under gecko browsers
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Automatic link creation (with description) not working under gecko browsers [message #31453] Tue, 25 April 2006 17:09 Go to next message
wariat is currently offline  wariat   Poland
Messages: 22
Registered: April 2005
Location: Poznań/Poland
Karma: 0
Junior Member

FUD forum 2.7.4

if you select some text, than click url_insert button in Internet Explorer it will make a link for you like:

FUD forum home

Under gecko browser (tested on Fx 1.5.0.1/Windows, Fx 1.0.7/Linux, Epiphany 1.8.4) it will create:

http://fudforum.orgFUD forum home

I'm not sure but it looks like the check_selection function in lib.js is turned off for all other browsers than IE, same time the insert Tag function works correctly in Fx so technically it should be possible to do it for url_insert() also.



Re: Automatic link creation (with description) not working under gecko browsers [message #31459 is a reply to message #31453] Wed, 26 April 2006 16:15 Go to previous messageGo to next message
Ilia is currently offline  Ilia   United States
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It works properly in Safair and Firefix 1.5.0.2, just tested the latest CVS.

FUDforum Core Developer
Re: Automatic link creation (with description) not working under gecko browsers [message #31468 is a reply to message #31459] Wed, 26 April 2006 18:40 Go to previous messageGo to next message
wariat is currently offline  wariat   Poland
Messages: 22
Registered: April 2005
Location: Poznań/Poland
Karma: 0
Junior Member

Ilia wrote on Wed, 26 April 2006 18:15

It works properly in Safair and Firefix 1.5.0.2, just tested the latest CVS.



http://fudforum.orgtest

[url]http://fudforum.org[/url]test


:> here is not working ... so as i understand it is fixed and will work in next release?

my current UA: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.2) Gecko/20060426 Firefox/1.5.0.2"



Re: Automatic link creation (with description) not working under gecko browsers [message #31473 is a reply to message #31468] Thu, 27 April 2006 14:13 Go to previous messageGo to next message
ggray is currently offline  ggray   Ukraine
Messages: 96
Registered: October 2004
Location: Crimea: Simferopol
Karma: 0
Member

hmm...
I replicate the problem on WindowsXPS2 - FireFox 1.5.0.2

[Updated on: Thu, 27 April 2006 14:18]

Report message to a moderator

Re: Automatic link creation (with description) not working under gecko browsers [message #31475 is a reply to message #31473] Thu, 27 April 2006 15:09 Go to previous messageGo to next message
ggray is currently offline  ggray   Ukraine
Messages: 96
Registered: October 2004
Location: Crimea: Simferopol
Karma: 0
Member

ok, i found the problem, and back-port from CVS patch to 2.7.4 forum version:
--- lib.js	2006-04-27 18:04:08.000000000 +0300
+++ lib.js	2006-04-27 17:59:15.000000000 +0300
@@ -37,7 +37,15 @@
 
 function insertTagMoz(obj, stag, etag)
 {
-	var txt = window.getSelection();
+	var txt;
+
+	if (window.getSelection) {
+		txt = window.getSelection();
+	} else if (document.getSelection) {
+		txt = document.getSelection();
+	} else if (document.selection) {
+		txt = document.selection.createRange().text;
+	}
 
 	if (!txt || txt == '') {
 		var t = document.getElementById('txtb');
  • Attachment: lib.js.diff
    (Size: 0.50KB, Downloaded 836 times)
Re: Automatic link creation (with description) not working under gecko browsers [message #31479 is a reply to message #31475] Thu, 27 April 2006 16:49 Go to previous messageGo to next message
wariat is currently offline  wariat   Poland
Messages: 22
Registered: April 2005
Location: Poznań/Poland
Karma: 0
Junior Member

What is the sense of testing method window.getselection in function which is called if:


function insertTag(obj, stag, etag)
{
	if (navigator.userAgent.indexOf("MSIE") > -1 && !OPERA) {
		insertTagIE(obj, stag, etag);
	} else if (window.getSelection && navigator.userAgent.indexOf("Safari") == -1) {
		insertTagMoz(obj, stag, etag);

??



Re: Automatic link creation (with description) not working under gecko browsers [message #31496 is a reply to message #31479] Mon, 01 May 2006 03:23 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
For browsers pretending to be Mozilla.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PM Error
Next Topic: V 2.7.4, msg error compiling pre_reg template
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 03:03:17 GMT 2024

Total time taken to generate the page: 0.02238 seconds