Skip to main content
Topic: Quote in quick reply no editor (Read 6037 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Quote in quick reply no editor

Opera (version 12.x, I have to install a new one at some point)
In a topic,
Quick reply "plaintext"
Quote a message
=> javascript error in this function:
Code: [Select]
function replaceText(a, b) {
if ("caretPos" in b && "createTextRange" in b) {
var c = b.caretPos;
c.text = " " == c.text.charAt(c.text.length - 1) ? a + " " : a;
c.select()
}
else if ("selectionStart" in b) {
var c = b.value.substr(0, b.selectionStart),
d = b.value.substr(b.selectionEnd),
e = b.scrollTop;
b.value = c + a + d;
b.setSelectionRange && (b.focus(), d = is_opera ? a.match(/\n/g).length : 0, b.setSelectionRange(c.length + a.length + d, c.length + a.length + d));

The error is at this piece:
Code: [Select]
a.match(/\n/g).length
and the error is:
Code: [Select]
Unhandled Error: Cannot convert 'a.match(/\n/g)' to object

Though, it seems the error appears only quoting one of the (broken) messages in this topic:
http://www.elkarte.net/index.php?topic=508.0
not the last one by Shawn.

Probably related to some wrong encoding somewhere...

Test °C
Bugs creator.
Features destroyer.
Template killer.

Re: Quote in quick reply no editor

Reply #1

Well the new scripts are not on the site yet, so I'm not immediately responsible :D

I'll take a look and see if I can reproduce that, I did install opera 12.x so I could surf old skool just like the Eman, also did it to fix up the detection stuff since past 12 it  is really webkit and all those opera checks should fail since after 12 its not really opera  ;)

Re: Quote in quick reply no editor

Reply #2

Don't waste time testing old Opera, if it doesn't work with the new one may be a problem, other wise I'd just remove the conditional... :P
Bugs creator.
Features destroyer.
Template killer.

Re: Quote in quick reply no editor

Reply #3

I fixed it anyway ... plus found some more ie5 stuff  :'(  so it was worth it  ;D

 

Re: Quote in quick reply no editor

Reply #4

IE5 ROFL!!!

Moving to fixed. :P
Bugs creator.
Features destroyer.
Template killer.