User Pass
Home Sign Up Contact Log In
Forum > Discuss GLB Issues With Catch22 > RESOLVED BUGS > Bold, Italics and Underline Button Issues. - RESOLVED BUG #199
Page:
 
Chris465 DTD
offline
Link
 
Doesn't look like the script is removing the original length of the selected string, when recreating the selection. If you select one character, it will offset the selection by an extra character, at the end. Select two, click a button, off by two, after your initial selection.

txtarea.selectionEnd = intEnd + text.length;

should be

txtarea.selectionEnd = intEnd + before.length + after.length;
 
The Big House
offline
Link
 
Bold
Italics
Underline

seems fine to me. Could it be browser problems?

Manually Entered tags:

BOLD
Italics
Underline

bold
Italics
Edited by The Big House on Jun 29, 2010 16:33:20
Edited by The Big House on Jun 29, 2010 16:33:14
Edited by The Big House on Jun 29, 2010 16:32:02
Edited by The Big House on Jun 29, 2010 16:31:29
Edited by The Big House on Jun 29, 2010 16:30:33
 
The Big House
offline
Link
 
Hold it. Hold It. The script doesn't respond to my underline tag. It will allow me to use bold and italics, but it won't respond to underlining.

Btw it's with the buttons.
Edited by The Big House on Jun 29, 2010 16:35:58
 
Lensar
offline
Link
 
Thanks guys, I'll send it up.
 
Lensar
offline
Link
 
Filed Bug 199.
 
Lensar
offline
Link
 
Fix Uploaded.
 
Karyn
offline
Link
 
This is still not working correctly if the fix is up.

Again, all with the buttons:

This sentence should be b
old.

This sentence should be underlined.

This WORD only should be italicized.

Looks like a button deal. Thanks!

Karyn
 
NiborRis
offline
Link
 
Hm, the behavior I saw before is fixed.

The word "junk" should be bold and underlined.

I double-click the word to highlight, then bold, then underline buttons, and the selection is correct each time.
I'm actually about to leave on vacation again in a day but I can check into this more next week.
 
Karyn
offline
Link
 
Originally posted by NiborRis
Hm, the behavior I saw before is fixed.

Try a different word - your example used the same word.

In this s
entence I made THIS word bold and THIS word underlined.

It spits the bit on the second time it's used. Again, just with buttons - anyone else see this?

Kar
Edited by Karyn on Aug 19, 2010 09:46:44
Edited by Karyn on Aug 19, 2010 09:45:04
 
Deathblade
offline
Link
 
Originally posted by Karyn

Try a different word - your example used the same word.

In this s
entence I made THIS word bold and THIS word underlined.

It spits the bit on the second time it's used. Again, just with buttons - anyone else see this?

Kar


no not at all
 
Karyn
offline
Link
 
Oh my... Well it's true. Again, ALL BUTTONS.

I typed this sentence and made THIS word bold.

OK, worked great.

Now I typed this sentence and made THIS word underlined.

Didn't work, went to my first sentence where I just BOLDED.

Now I type this sentence and made THIS word italicized.

It keeps going back to the first word. Trust me on this...

Karyn
 
Deathblade
offline
Link
 
um not sure what you are talking about sorry

maybe a terrible browser?
 
Deathblade
offline
Link
 
actually, yeah, IE is doing it

weird
 
Deathblade
offline
Link
 
has to be something in this code


// IE is dumb

var bookmark = document.selection.createRange().getBookmark()

var selection = inputBox.createTextRange()

selection.moveToBookmark(bookmark)



var before = inputBox.createTextRange()

before.collapse(true)

before.setEndPoint("EndToStart", selection)



var beforeLength = before.text.length

var selLength = selection.text.length



return {

start: beforeLength,

end: beforeLength + selLength

}
 
Karyn
offline
Link
 
Originally posted by Deathblade
actually, yeah, IE is doing it

weird

You sound angry about it. I'm just pointing out how it DOESN'T work. Forums make this game for me.

K
 
Page:
 


You are not logged in. Please log in if you want to post a reply.