ElkArte Community

Elk Development => Bug Reports => Topic started by: Jorin on May 08, 2017, 12:06:36 pm

Title: [1.0.10] cursor position when using "quote"
Post by: Jorin on May 08, 2017, 12:06:36 pm
1. Start a post without typing a single character. Click on the quote BBC button.

The cursor jumps to this postion (marked in red): [quote] | [/quote] <-- No bug!

2. Write a post (at least some words). Place your cursor in a new line (or anywhere else, makes no difference). Click on the quote BBC button.

The cursor jumps to this postion (marked in red): [quote][/ | quote] <-- Bug!
Title: Re: [1.0.10] cursor position when using "quote"
Post by: emanuele on May 08, 2017, 05:59:04 pm
Browser?
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on May 09, 2017, 03:03:53 am
Happens in FF using the WYSIWYG editor too.  Types right in the quote box.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Jorin on May 09, 2017, 07:28:28 am

IE and Chrome (Chrome with desktop computer and mobile).
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on May 09, 2017, 07:15:05 pm
I must be doing something different, but I can't reproduce that behavior yet.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: emanuele on May 09, 2017, 11:08:02 pm
I can reproduce some issue with the WYSIWYG (i.e. when clicking the quote BBC button the cursor basically disappears and I can't write unless I click inside the quote shape), but in with the non-WYSIWYG editor seems to work fine on my test site.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Jorin on May 10, 2017, 07:14:15 am
I am not using the WYSIWYG editor. I will make a video of it later when I'm home.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on August 15, 2017, 03:27:25 am
Maybe this will help?  Quoting using Quick Reply works fine.   Using the Reply page, then Insert Quote works fine.  If you aren't using Quick Reply, then click Quote from the post, the issue arises.  The cursor invariably goes in the Quote box.  It won't come out of the box, even with a hammer.  ;D
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Jorin on August 15, 2017, 07:00:31 am
Oh, where's my video?  :o
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on August 15, 2017, 03:02:08 pm
I'm still having trouble creating these behavior(s) (at least on this site) .... sorry !  :'(
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on August 15, 2017, 03:10:09 pm
Quote from: Spuds – I'm still having trouble creating these behavior(s) (at least on this site) .... sorry !  :'(
Here is a replication example.
No matter what, I cannot type outside the quote box.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on August 15, 2017, 03:11:18 pm
In your Look and Layout, enable WYSIWYG, and disable Quick Reply.  Quote directly from a user's post, not insert from below.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Jorin on August 15, 2017, 05:25:08 pm
Well, that's strange. I can't replicate it now too!  :o  Not here and not in my board!  :o  :o
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on August 15, 2017, 05:46:37 pm
Quote from: badmonkey – In your Look and Layout, enable WYSIWYG, and disable Quick Reply.  Quote directly from a user's post, not insert from below.
Now that I could reproduce and it should be fixed here.
Quote from: Jorin – Well, that's strange. I can't replicate it now too!  :o  Not here and not in my board!  :o  :o
Well now I don't feel so bad :D ... could still be an error in there, something with a certain combination of options and how the quote gets inserted.  So many ways to do something can make it difficult to reproduce and fix.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on August 15, 2017, 07:36:20 pm
Thanks Spuds!  You da man!!!  Woot!!!   ;D



Is there a fix for us?   ;)
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on August 15, 2017, 11:07:33 pm
More of a trick than a fix  O:-)

Open your themes/default/scripts jquery.sceditor.elkarte.js file ... find:
Code: (find) [Select]
			content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote>
Code: (replace) [Select]
			content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote>&nbsp;';
So just adding a trailing &nbsp; to somewhat trick the editor
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on October 20, 2021, 02:15:15 am
Sorry to ressurect this thread, but 1.1.8 is having similar issues again.  :o
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on October 21, 2021, 02:41:17 am
It may be a few days before I can look into this :(
Title: Re: [1.0.10] cursor position when using "quote"
Post by: forumovod on November 10, 2021, 10:02:48 pm
Quote from: Spuds – It may be a few days before I can look into this :(

After updating to ElkArte 1.1.8, some users began to complain about glitches when quoting. The text of the user's response is placed inside the quote.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Steeley on November 11, 2021, 06:46:54 am
Quote from: forumovod –
Quote from: Spuds – It may be a few days before I can look into this :(

After updating to ElkArte 1.1.8, some users began to complain about glitches when quoting. The text of the user's response is placed inside the quote.

forumovod - did you edit your post,  or did I just have another glitch come floating into my email inbox?

Quote from: forumovod – > On: Tue Aug 15, 2017 badmonkey Wrote:  
Quote
 Is there a fix for us?  ;)  

After updating to ElkArte 1.1.8, some users began to complain about glitches
when quoting. The text of the user's response is placed inside the quote.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: forumovod on November 13, 2021, 04:43:29 am
Quoteforumovod - did you edit your post,  or did I just have another glitch come floating into my email inbox?

Yes, I first quoted the old message, and then I saw that there is a newer answer in the topic. Therefore, I corrected the quote.
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Steeley on November 13, 2021, 05:28:05 am
Cool - I presume Spuds breathes a temporal sigh of relief..
Title: Re: [1.0.10] cursor position when using "quote"
Post by: Spuds on November 15, 2021, 07:57:53 pm
Attached is a test build to see if it fixes the issue for everyone.  Replace the file in /themes/default/scripts (make a copy incase you find this version worse)

Some notes!

- The quote regression error looks like it happened in 1.1.7 when we made some fixes that prevent possible XSS via the editor.  There was really no proof of concept but certainly a weakness we cleaned up.
- Since I will have to spin a new release at some point, I decided to pulled in several improvements from 2.0 into this update, so there could be other bugs, see there is no free lunch here.  The improvements that I recall are:

1) If you selected several lines of text and "list" they would all be in one bullet, now each line will be a bullet
2) Current editor does not work with the quick list item codes, this version should
3) tt/pre should now allow selecting the toolbar icon to end the tag if you are in that tag or start a one otherwise.  Also selecting text in those tags should remove the formatting.  Basically it attempts to make those tags act like native tags bold, italic, etc.  Yes there are still quirks.
4) Misc stuff
Title: Re: [1.0.10] cursor position when using "quote"
Post by: badmonkey on November 16, 2021, 03:01:19 am
Quote from: Spuds – Attached is a test build to see if it fixes the issue for everyone.  Replace the file in /themes/default/scripts (make a copy incase you find this version worse)



Thanks spuds! I've deployed on a pair of sites. The quote fix appears to be working. No feedback on the other elements so far.