Can't quote in Firefox 1.5

Monday, January 30, 2006 by Thomas Thomassen | Discussion: WinCustomize Site Issues

After I upgraded to Firefox 1.5 and I hit the quote button the quote blocks are empty. I was wondering is there might be something in the settings that had turned this feature of by default, but I have not been able to find anything. Is this due to a change in Firefox 1.5, if so can I fix it? Or is it a compatibility issue with WC and FF1.5?
Cavan1
Reply #1 Monday, January 30, 2006 6:12 AM
Same problem here Thomas, it has been mentioned in other threads but I have not seen any answers as to why.
When highlight what I want to quote I right click and copy, hit quote button, paste text between tags.
Kevin_C
Reply #2 Monday, January 30, 2006 9:52 AM
Well, after doing a little digging around there seems to be a bug in the 1.5 release of FF that cause some events to fire in the wrong order. Specifically OnBlur and OnFocus, now I'm not sure this is exactly what is going on but the problem seems to be that in FF when you click on the Quote button, the page selection is lost, so by the time the js function gets around to calling document.getSelection() there is no longer a selection and it returns a blank value. I tried to create a work around but onClick fires before OnFocus in FF 1.5 for some reason which seems very wrong to me.

Hopefully the FF team will get this ironed out because this is really annoying. Not for the issue here but for the effects it could have on other event dependent work.
Bichur
Reply #3 Monday, January 30, 2006 10:04 AM
and clicking the comment or more details or download makes the page drop a hair
Kevin_C
Reply #4 Monday, January 30, 2006 10:25 AM
and clicking the comment or more details or download makes the page drop a hair


Actually, it seems that what happens is that the buttons move down. Almost like they are supposed to be positioned at the bottom of the display area but for some reason they don't show up there until you click on them.
Bichur
Reply #5 Monday, January 30, 2006 10:48 AM
atually... that's what I meant but's it's Monday.
aimzzz
Reply #6 Monday, January 30, 2006 12:00 PM
Change to Opera
aimzzz
Reply #7 Monday, January 30, 2006 12:02 PM
Sir B-- are you on WC from work?
Bichur
Reply #8 Monday, January 30, 2006 12:08 PM
naw...didn't go in today...me ma is not feeling well
thomassen
Reply #9 Monday, January 30, 2006 12:26 PM
how about cache the selection in a variable when the user selects some text and use that variable for the quoting?

onClick triggering before onFocus seem very odd. haven't seen that in any other programming enviroment.

no. not using Opera. I got too many extensions I like with Firefox.
aimzzz
Reply #10 Monday, January 30, 2006 12:40 PM
me ma is not feeling well

Sorry to hear
However, missing work seems to be going down well...
Kevin_C
Reply #11 Monday, January 30, 2006 2:55 PM
how about cache the selection in a variable when the user selects some text and use that variable for the quoting?


Actually I made a workaround that does something similar but it uses a hidden form element to hold the selection and is triggered by an OnMouseOver on a button. This works is a simple case but would definitely need tweaking in a large thread because it might have some unintended side effects. Anyway, I'm sure the WC folks can fix it but it's probably not a priority ATM.

Oh yah, and it seems that the document.getSelection() function is deprecated in FF 1.5, it suggests the use of window.getSelection().
Phoon
Reply #12 Monday, January 30, 2006 3:36 PM
Actually I made a workaround that does something similar but it uses a hidden form element to hold the selection and is triggered by an OnMouseOver on a button. This works is a simple case but would definitely need tweaking in a large thread because it might have some unintended side effects. Anyway, I'm sure the WC folks can fix it but it's probably not a priority ATM.


I just copy the text, hit the quote button, and paste betweent the "quote brackets"
Double Zero
Reply #13 Monday, January 30, 2006 6:12 PM
I just copy the text, hit the quote button, and paste betweent the "quote brackets"


LMAO Phoon, I thinks thats what we all have been doing..point being we shouldnt have to...
Phoon
Reply #14 Monday, January 30, 2006 6:37 PM
Hehe... sorry.. was in a rush and didn't read everything completely.
Now that everyone has had a good laugh... resume your regularly scheduled thread....



And...
You can quote me on that!
thomassen
Reply #15 Monday, January 30, 2006 6:56 PM
You can quote me on that!

oooh! baddabom!


Oh yah, and it seems that the document.getSelection() function is deprecated in FF 1.5, it suggests the use of window.getSelection().

But that won't do much if the onClick event triggers first. Have you found any info on why the event triggering order has been changed?
Kevin_C
Reply #16 Tuesday, January 31, 2006 9:06 AM
Have you found any info on why the event triggering order has been changed?


I believe it's a bug in FF 1.5. Here's the test I wrote that works in FF maybe a WC developer can drop this in to the js file so those of us FF users can stop the select, copy, click quote, paste, process we all love so much..

[head]
[script type="text/javascript"]
function getPageSelection() {
if(window.getSelection && document.getElementById("selection").value != "") {
alert(document.getElementById("selection").value);
document.getElementById("selection").value = "";
}
else if(document.selection)
alert("IE");
}
function setSelection(selectedText) {
document.getElementById("selection").value = selectedText;
}
[/script]
[/head]
[body]
This is some text in the page...


[input type="Button" onMouseOver="setSelection(window.getSelection())" onClick="getPageSelection()" value="Show Selection"/]
[input type="Hidden" id="selection" name="selection" value=""/]
[/body]

< and > characters replaced in the hope the code won't get removed...
Kevin_C
Reply #17 Tuesday, January 31, 2006 10:05 AM
Darn... I was going to see if I could make a page that could be kept locally that would allow you to interact with the forums normally but would provide a quote button that works in FF but due to security restrictions in browsers it's not doable.. Oh well, it was worth a shot.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01