 |
|
|
|

| Autor |
Nachricht |
antoonvdr
phpBB2.de User


Anmeldungsdatum: 12.08.2004
Beiträge: 40
Wohnort: Canada
|
Verfasst am:
Sa 23 Sep, 2006 03:11 |
  |
I came across a strange behavior that I can only reproduce in IE, not in Firefox. You can try this for yourself on the "official" phpBB2Plus page: http://www.phpbb2plus.de/posting.php?mode=newtopic&f=1
Start a new post and write some text. Then select one of the smilies and click on it:
ALL THE TEXT IS GONE and replaced by the smiley!!
Anybody?
Thanks  |
|
|
    |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
antoonvdr
phpBB2.de User


Anmeldungsdatum: 12.08.2004
Beiträge: 40
Wohnort: Canada
|
Verfasst am:
So 24 Sep, 2006 15:41 |
  |
I found these differences:
phpBB Plus, in add_bbcode.js:
| Code: |
function emoticon(text) {
text = ' ' + text + ' ';
PostWrite(text);
} |
and
| Code: |
function PostWrite(text) {
if (document.post.message.createTextRange && document.post.message.caretPos) {
var caretPos = document.post.message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
}
else document.post.message.value += text;
document.post.message.focus(caretPos)
} |
Compare that to the "old" emoticon function in phpBB, which was placed in templates/subSilver/posting_body.tpl:
| Code: |
function emoticon(text) {
var txtarea = document.post.message;
text = ' ' + text + ' ';
if (txtarea.createTextRange && txtarea.caretPos) {
var caretPos = txtarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
txtarea.focus();
} else {
txtarea.value += text;
txtarea.focus();
}
}
|
It seems to me that an error was made in the Postwrite function, see the 4th line....
BTW by replacing the emoticon function in add_bbcode.js by the old version made everything work again
PS This only happens in Internet Explorer, Firefox is more forgiving! |
|
|
    |
 |
Mars89
phpBB2.de User

Anmeldungsdatum: 21.02.2007
Beiträge: 6
|
Verfasst am:
Mi 21 Feb, 2007 02:31 |
  |
Same problem, can you explain some easyer? thanks, |
|
|
   |
 |
Mars89
phpBB2.de User

Anmeldungsdatum: 21.02.2007
Beiträge: 6
|
Verfasst am:
Do 22 Feb, 2007 16:53 |
  |
|
   |
 |
srhh
phpBB2.de User

Anmeldungsdatum: 14.05.2008
Beiträge: 3
|
Verfasst am:
Mi 14 Mai, 2008 06:33 |
  |
I haven't been able to reproduce this in IE, maybe IE7 doesn't have this bug? |
|
|
   |
 |
|
|
|
|
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum nicht posten Du kannst Dateien in diesem Forum herunterladen
|
|
| |