Automatic link creation (with description) not working under gecko browsers [message #31453] |
Tue, 25 April 2006 17:09 |
|
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 #31475 is a reply to message #31473] |
Thu, 27 April 2006 15:09 |
|
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 833 times)
|
|
|
|
|