miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Suggestions miniBB Support Forums / Suggestions /  
 

Quote function - support for Safari?

 
 
Page  Page 3 of 3:  « Previous  1  2  3

Author marsbar
Associated Member
#31 | Posted: 27 Feb 2006 14:01 
Team wrote: Not really clear what does it mean - it's just a code snippet from form.js file

Exactly my thoughts, Team!* I think the Safari user may have misunderstood what I was asking him to report back. Anyhow, I have access to Safari at work, so when I go back to work tomorrow, I will try to get you the exact error message.
Cheers,
mb

* note: I did not do a line-by-line comparison between the code shown in my previous post and the original form.js; however, the following lines seem to stand out as being different from the original form.js code:

[function paste_strinL...]

if (isQuote==1) {
bbCode1=''; bbCode2=''; endOfLine=' ';
}
if (isQuote==2) {
bbCode1=''; bbCode2=''; endOfLine=' ';
}

Author Team
8-)
#32 | Posted: 27 Feb 2006 14:20 
Line endings were just converted on our board... so, the code seems the same as we have in the latest release. But we don't need to look at the code :-) we need to look at the error report.

Author marsbar
Associated Member
#33 | Posted: 28 Feb 2006 01:27 
Team wrote: we need to look at the error report.

Hi Team,

I have Safari set to log JavaScript exceptions, but nothing is logged, which I take to mean that your script is good and that the problem must lie elsewhere.

I am composing this post in Safari 1.3.2 now. If I just click on 'Quote' without selecting any text first, I get "undefined" (with the raw tags showing) in this text box; and if I select some text first and then then click 'Quote', I get the same result. This suggests the Safari browser has trouble keeping text selected if a link is clicked (in this case the 'Quote' link).

What I find strange is that if the browser is the problem, the quote function should fail consistently, not work one day and fail the next, which is what happened. (I do not recall updating the browser on this Mac--perhaps an update happened in the background without my knowledge?--but I do recall replacing form.js as part of the upgrade to v2RC5a.)

- bewildered mb
*shuffles away*

P.S. Not every broswer running on this Mac is complaining: the quote function works correctly in Firefox 1.5, MSIE 5.2 and the Mac-only Camino 1.0b2. <-- links point to test posts made in the 'Qwerty' test board. :-)

Author Team
8-)
#34 | Posted: 28 Feb 2006 10:56 
undefined could appear because Safari understands some of the methods, but interprets it different way. As in RC5, in RC5a we are using the same window.getSelection, document.getSelection and document.selection methods. It's very hard to say, what exatly method is compatible with Safari. Maybe you may try to replace the function pasteSel() in form.js to that:

function pasteSel() {
selektion='';
if(document.getSelection) selektion=document.getSelection();
else if(document.selection) selektion=document.selection.createRange().text;
else if(window.getSelection) {
this.thisSel=window.getSelection();
selektion=this.thisSel.toString();
}
}


i.e. all methods are the same, but the order is the same as in RC5 release.
Try it and report the results... thanks.

Author marsbar
Associated Member
#35 | Posted: 1 Mar 2006 13:05 
Nope, still not working, Team... :-(

Here is a report sent to me by a Safari 2.x user:
"I don't know if this helps (as it's all Greek to me) but when using the JavaScript console in the debug menu, I get line 30 highlighted (that is bbV=myValue.length;)
I also tested the other browsers just now. Firefox and Camino both work but IE copies the highlighted text to the text box without the [i] and [/i] tags."

- mb

Author Team
8-)
#36 | Posted: 1 Mar 2006 15:40 
Still nothing useful... bbV=myValue.length actually is a very basic JavaScript method call, and it was not changed since previous release.

Awaiting for more helpful logs...

Author Ulbador
Guest
#37 | Posted: 28 Apr 2006 17:45 
Found the fix for this.. I really don't own the credit for this, it came from:

macosxhints.com/article.php?story=20050422144207644

Here is the pertinent code changes:

function pasteSel() {
selektion='';
if(window.getSelection) {
this.thisSel=window.getSelection()+'';
selektion=this.thisSel.toString();
} else if(document.getSelection) selektion=document.getSelection()+'';
else if(document.selection) selektion=document.selection.createRange().text;
}

The changes come in the addition of +'' on two of the lines


Adam

Author Team
8-)
#38 | Posted: 28 Apr 2006 19:34 
Anybody from Safari users can confirm the above code working?

Author marsbar
Associated Member
#39 | Posted: 1 May 2006 03:38 
I've only got access to Safari 1.3.2 (v312.5) here; I am not sure if it is just me, but the code change to form.js has not made any difference - the problem remains. :-(
- mb

Author Ulbador
Guest
#40 | Posted: 8 May 2006 19:12 
Should mention that this fix works in Safari 2.0.3 (417.9.2).

Author marsbar
Associated Member
#41 | Posted: 8 May 2006 23:22 
That is excellent news, Ulbador! I think I will use the code, which should at least keep some of my Safari users happy. :-)
- mb

Author Paul
Lead Developer 
#42 | Posted: 9 May 2006 07:16 
It would be cool if somebody except the author could confirm the code finally. So we can include it in the official distribution.

Author marsbar
Associated Member
#43 | Posted: 9 May 2006 09:52 
Good news: just received feedback from a couple of Safari 2.x users - the code change I made earlier today has allowed them to use the quote function again. They are very happy.
- mb

Author Paul
Lead Developer 
#44 | Posted: 9 May 2006 10:56 
Ok, we will include this in the next subrelease.

Page  Page 3 of 3:  « Previous  1  2  3 
Suggestions miniBB Support Forums / Suggestions /
 Quote function - support for Safari?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑