Add Entry bug

Found a bug? Tell us!!
Post Reply
evanslee
Regular
Posts: 28
Joined: Tue Jul 27, 2010 3:21 pm

Add Entry bug

Post by evanslee »

On the add entry screen

If you enter some text and highlight a word, then click a markup button (i.e italic), then backspace you lose eveything you have just typed.

Fix: would be to change the focus to the highlighted text again after clicking any of the markup buttons.
onli
Regular
Posts: 2836
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Add Entry bug

Post by onli »

Which Editor in which browser? I can't reproduce this with the non-wsyiwyg-editor. There, nothing gets focused or deleted.
evanslee
Regular
Posts: 28
Joined: Tue Jul 27, 2010 3:21 pm

Re: Add Entry bug

Post by evanslee »

Serendipity: 1.5.3
Browser: IE7
Serendipity Editor: Standard with markup buttons (not wiziwig)

I can recreate this bug over n over again...

Highlight a word
Click a markup button [which wraps the word but leaves it highlighted]
When you click backspace rather than delete the highlighted word it navigate to another page...


Backspace works fine if i highlight a word in the textbox but dont use any of the markup buttons...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Add Entry bug

Post by garvinhicking »

Hi!

Hm, basically serendipity_editor.js should already do the .focus() due to the "wrapSelection()" function at around line 61. It only does that if "scrollTop" is available, maybe this is a FF-only property?

You could try to set scrollPos = true; at the top of the function and see if that helps? (Remember to clear your browser cache before trying)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
evanslee
Regular
Posts: 28
Joined: Tue Jul 27, 2010 3:21 pm

Re: Add Entry bug

Post by evanslee »

Thanks, that did the trick.

Nice one :)

Regards,
Lee
Post Reply