Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.9.7 - Strange issue with Backspace key & draft saving #2373

Closed
calebpaine opened this issue Aug 5, 2015 · 65 comments
Closed

v1.9.7 - Strange issue with Backspace key & draft saving #2373

calebpaine opened this issue Aug 5, 2015 · 65 comments

Comments

@calebpaine
Copy link

I've had multiple staff members complain that pressing the backspace key while the "Save Draft" message is up causes the cursor to skip back to the first position (row 1 col 1) and is very frustrating to them as they're typing out a message. We've made no changes to the server or software. As we're still on a (slightly) older 1.9.7 I can only attribute it to something in one of the JS libraries, or a change in browser behavior with said JS. So for the only offender seems to be FireFox.

Seems to be similar, though not exactly the same as #2322

@ghost
Copy link

ghost commented Aug 5, 2015

I got similar complaints from my agents with osticket 1.9.11 (and 1.9.8.1) in combination with firefox 39. It is not so easy to replicate this (at least for me). They use it the whole day and writing much faster than me and they can reproduce it multiple times a day. In our case the cursor disappears suddenly (when using backspace during the writing) and the writing of text continues at the first position of the redactor window. This is my environment:

osTicket-Version v1.9.11 (c1b5a33) — Up to date
Server-Software Apache
MySQL-Version 5.5.44
PHP-Version 5.4.43-1~he.0

@oneilak
Copy link

oneilak commented Aug 5, 2015

i have the same problem in v 1.9.11

@TinkerFu
Copy link

TinkerFu commented Aug 7, 2015

Same issue. Version 1.9.11, Firefox 39.0.3. It;s driving me insane. As a temporary fix I installed noscript. Not the best solution but at least now I can type.

@calebpaine
Copy link
Author

I can confirm first hand the issue still exists in Firefix 40.0.2

@keanpedersen
Copy link

I think this issue might be solved with version 10.2.3 of Redactor, which was released on August 15. Changelog includes:

  • Issue in Firefox when in linebreaks mode using Backspace lead sometimes to cursor disappearance

@greezybacon
Copy link
Contributor

I agree. I saw that fix and will work on upgrading redactor in osTicket-1.8 develop-next

@gitfve
Copy link

gitfve commented Nov 19, 2015

Where to get a fix for the problem? I use v1.9.12 and the problem still exist.

@ghost
Copy link

ghost commented Nov 20, 2015

As you can see will be the fix the implementation of a newer redactor version in osTicket 1.10 (osTicket-1.8 develop-next). So you will have to wait until 1.10 is stable or as a workaround use a different browser..

@lehha
Copy link

lehha commented Nov 26, 2015

+1
wait for stable version, this error is a terrible inconvenience...

@PeopleInside
Copy link
Contributor

Very terrible! I have loosed a ticket reply for that because write my response to a ticket was very difficoult... so i switched to non HTMl by the button <> and when sended the reply all my text was loost, not sent and not visible again by pressing back button.

I AM also waiting the 10 relase as solve also the issue with registration link who not work if the user is logged as guest and are viewinf ticket So two beautiful issue to resolve with the new version, hope can be relased soon.

@gitfve
Copy link

gitfve commented Jan 10, 2016

When to expect a working solution for the editor problem?

@PeopleInside
Copy link
Contributor

Right question :) is not a small issue... is very hard to manage tickets.

@calebpaine
Copy link
Author

This is a pretty major issue, I understand that 1.10 has a lot of new stuff in it, would it be possible to just make a point release of 1.9 to fix this bug? OSTicket is pretty much impossible to use with Firefox if rich-text is enabled, so we've been forced to turn it off.

@rjboer
Copy link

rjboer commented Jan 21, 2016

1.9.12 and have this too, its driving some of the staff nuts..
Can't we change redactor for another editor?

@rjboer
Copy link

rjboer commented Jan 22, 2016

Perhaps too early to cheer, following the instructions of Draconis, on the website of osticket, i believe our osticket was fixed.
We weren't able to reproduce the issue (yet).

On line 308 of redactor-osticket.js located in folder js of your osticket installation :
if (settings.url.indexOf('ajax.php/draft') != -1
change: ajax.php/draft into ajax.php.draft

On a sidenote:
Two quick spaces followed by a quick backspace equals an enter, but only once every two times :P Redactor is one big easter egg :P

@PeopleInside
Copy link
Contributor

Thanks for share @rjboer

@rjboer
Copy link

rjboer commented Jan 29, 2016

That didn't quite cut it, the editor still loses focus... (only focus this time, it does not reset itself to the beginning of the line, seen only one error)
We now set the save interval to 10000 (beginning of the file redactor-osticket.js, mentioned before), such that no saves occur.

Be aware to restart apache..for changes to come through

However, i think it has something to do with the following.....
save
Saves cursor position in Redactor.
This is useful in case, for example, you want to open a modal window and perform some actions in it. In this case, Redactor will lose focus and cursor position. To restore focus cursor position, you should save it first using selection.save and restore afterward using selection.restore.

this.selection.save();

restore
Restores cursor position (previously saved by selection.save)

this.selection.restore();

@Curium
Copy link

Curium commented Apr 13, 2016

Hi guys,
I see it has been quiet here for some time. Anyone found a good solution? I have the same problem on version 1.9.12 so this isn't patched yet.

@greezybacon
Copy link
Contributor

The v1.10 branch (develop) contains a newer version of Redactor, version 10.2.2. Since it's an upstream issue, I'm hoping the upgrade will resolve it.

@Curium
Copy link

Curium commented Apr 14, 2016

Great news! This is really driving me crazy :)
Any preliminary time line on the v1.10 release?

@greezybacon
Copy link
Contributor

We're poised to make an rc3 release. It's proving pretty stable, so that will likely be the final release candidate release

@Curium
Copy link

Curium commented Apr 15, 2016

Thumbs up!

@calebpaine
Copy link
Author

It looks like 1.9 branch has had two interim patches I didn't see, .13 & .14, anyone tested these yet to see if it resolves this issue?

@phamquocbuu
Copy link

My hacked file, the bug fixed :)

https://gist.github.com/cosmospham/78974d588805fc3cc9b8c3deac71f54d

@FossPrime
Copy link
Contributor

FossPrime commented Feb 9, 2017

@comfine have you tried msigley's patch? try it in a private session to avoid using a cached version.

I can confirm it's still happening on develop with the latest firefox

Steps to reproduce

  1. use firefox
  2. start a ticket reply
  3. type some text
  4. wait around 15 seconds until the draft saved popup shows up
  5. hit the backspace key

Expected behavior

A character gets deleted.

Actual behavior

textarea loses focus and your input does not go in.

@msigley
Copy link

msigley commented Feb 10, 2017

@rayfoss I was writing a response to this yesterday and apparently I never hit save.

I believe this is actually two issues, buggy redactor, which I believe the 10.2.5 update helps with but doesn't eliminate and draft saves and deletions broken due to older mysql logic and MariaDB. The workaround I found for the draft issue can be found in this issue report:
#3193

@msigley
Copy link

msigley commented Feb 10, 2017

The real fix for this issue is to replace redactor with a more FOSS friendy editor like tinymce, but this is gonna be alot of work.

@comfine
Copy link

comfine commented Feb 11, 2017

msigley: i tried the fix you posted in #3193, and also, i installed the redactor update/fix posted by you, but i still have problems with a jumping cursor (just some minutes ago the cursor jumped two rows down while i was typing inside a already written text). :-(

@msigley
Copy link

msigley commented Feb 11, 2017 via email

@comfine
Copy link

comfine commented Feb 13, 2017

Of course WE could use another browser, but do you agree, that we cannot force all the customers to use another browser!?

@msigley
Copy link

msigley commented Feb 13, 2017

Is your firefox up to date? Maybe you could starr working on replacing redactor with tinymce?

@comfine
Copy link

comfine commented Feb 13, 2017

we are using the ESR-Release, but our customer had the same Problem with the newest Firefox-Version!

...my attempts to contribute some code were not sucessfully in the past, but i would love it to support the OS-Ticket-project, but right now we have to close almost 200 Tickets (with a very small team) before i could spend some time for other things :-(

@BlackTiger63
Copy link

BlackTiger63 commented Mar 6, 2017

I also would like this fixed. I'm NOT happy with Chrome so I won't change to it only for Osticket because then I get other issues with other things.
And my Firefox is up to date (51.0.1) and having the same problem on v 1.10 even after commenting a line to disable draft in redactor.js as suggested on the forums.
I did not try any tips from Github yet, since they seem not to help if I read it correctly here.

@PeopleInside
Copy link
Contributor

I do not like Chrome too. I love Firefox :D

@bogdandanielb
Copy link

bogdandanielb commented Apr 23, 2017

@msigley thanks for sharing that.
You can grab the latest version from here: https://github.com/yiiext/imperavi-redactor-widget/blob/master/assets/redactor.min.js
I'm not sure about the licensing since Redactor is not open source anymore: https://imperavi.com/redactor/license/

@comfine
Copy link

comfine commented Apr 24, 2017

i am sorry, but we are using 10.2.5 and the problem is still present! i reported the bug at redactor now.

@PeopleInside
Copy link
Contributor

I AM using this solutions: #2373 (comment)
and for me works.

@comfine
Copy link

comfine commented Apr 24, 2017

@PeopleInside Which Firefox-Version do you use?

@PeopleInside
Copy link
Contributor

Firefox 53

@comfine
Copy link

comfine commented Apr 24, 2017

We have 52.0.2 - problem occured yesterday last time... i updatet to 53 now, but i suppose, it'll happen again. The bug i opened at the github-link from bogdandanielb was closed, as this was just a php-widget, not redactor by itself...so there's no hope from this site, that something will change.

@PeopleInside - it is very interesting, that you can not see this bug anymore at your setup, while we still do! can you provide detail-information? is your firefox 32 or 64 bit? which OS do you use? have you disabled the "autosave-Draft"-function?

@PeopleInside
Copy link
Contributor

No but maybe some issue continue to be... I was having an issue that in the time I was write a message cursor sometimes went moved... I solved this issue.

@lehha
Copy link

lehha commented Apr 24, 2017

I think that BUG appear when a popup "Draft saved" is opens, may be he taken cursor focus? Before that popup, backspace work normal.

@comfine
Copy link

comfine commented Apr 24, 2017

@PeopleInside it would be helpful if you could tell us, which OS you use, which Bit-Version of FF you use, i suppose, you said "NO" regarding my question if you disabled the autosave-drafts-function, is that right?

@PeopleInside
Copy link
Contributor

Are you able to see the cursor issue also in visitor side?
I never disabled autosave as from I remember. I replaced the editor text with the text in the comment I mentionated.
However if you need talk with me you can visit my github profile, and here find my website link where you can start a chat. I AM sorry for issue in OsTicket, this is an old bugs and I also be forced to apply a patch unofficial for made OsTicket support PHP 7.1

@comfine
Copy link

comfine commented Apr 24, 2017

@PeopleInside i wrote you at gitter without response... anyway, again over here:

i could see the problem at client-side aswell, yes, but maybe this was before i applied the new redactor-version - i am not sure about this. it would be really interesting which OS you use and which FF-bit-Version. if you are 100% sure, that the problem is fixed at your side something different or additional then the patch must be still causing this issue!

PS: i reloaded the ostickets-backend now by pressing STRG+F5 - maybe the old JS-File was still in the cache and maybe this caused the issue - i will report back....

@bogdandanielb
Copy link

@comfine my current setup is the following:

  • osTicket Core, v1.10
  • Redactor 10.2.5 - snatched from the link provided in my earlier post and replaced existing 10.2.2 version
  • Firefox 53.0 (32-bit)
  • Windows 10 Professional edition

The issue I had was on Agent panel when responding to existing tickets and pressing backspace.
Let me know if you need more information.

@comfine
Copy link

comfine commented Apr 27, 2017

@bogdandanielb
you are talking about the backspace-problem, right? but can you see other problems with jumping cursors, for example if you write inside a written text (some additional sentence in between...) the cursor just jumps to another line?

i could see, that it happened always at the same position. in my text has been two ! - and when i wanted to write a letter before this, some problem occured, multiple times ( i don't remember exactly if the cursor was jumping, or if the pressed letters didnt appear....) - there seem to be some other bugs in Redactor 10.2.5 aswell. :-( ....so the only solution, as this is closed source now... would be to replace the WYSIWYG-Editor ...or fork the last version and fix the problem... but i am not that good in JS and i dont have the time :-(

i posted in the other thread this morning:
problem still occurs!
Cursor jumps arround sometimes... for example, when i write in the middle of a written text, sometimes the cursor just jumps to the next line while i type in some letters, so this is not the backspace-problem... but still a "Cursor-Jumping-Problem".

@PeopleInside: can you please tell me which OperatingSystem you use?

@bogdandanielb
Copy link

@comfine I had that issue too where the cursor was moving to a different location when trying to add additional words to existing text. I cannot seem to reproduce that issue anymore. This was in addition to the backspace issue which was triggered usually when using this key after a space.
Can you create a small video, perhaps, so I can follow the steps on my side?
Are you using the same firefox version as I do?

@comfine
Copy link

comfine commented Apr 27, 2017

@bogdandanielb i am sorry, i cannot reproduce like you - if it'll be reproducable in any case i will try to capture a video....

our environment:
Firefox 53.0 32 bit
osTicket v1.10
Redactor 10.2.5
Windows Server 2012R2 (so we are on "Windows 8.1" instead of Window 10 (Windows Server 2016) - maybe this happens only in Windows 8.1) - i'll try to keep an eye on that as far as possible.

@msigley
Copy link

msigley commented Apr 27, 2017

@bogdandanielb You are reading that change log wrong. OSTicket uses the original Redactor, not Redactor II (closed source version) which is what that change log is for. Redactor switched to closed source around July 2015:
https://imperavi.com/blog/long-overdue-quick-update/
https://imperavi.com/blog/redactor-superior-in-every-way/

Redactor 10.2.5, which we both found at the link below, appears to be the last unofficial publicly available update to Redactor, which is why I suggested the only real fix to these issues is to replace Radactor with a another WYSIWYG editor that is FOSS. TinyMCE is probably the best choice given its widespread use in Wordpress.
https://github.com/yiiext/imperavi-redactor-widget/blob/master/assets/redactor.min.js

@bogdandanielb
Copy link

@msigley You are correct, that change log was a bit misleading for me.
Anyway, 10.2.5 works fine for me at the moment but I will continue testing it and get back in case the issue persists.

@JediKev JediKev closed this as completed Jan 6, 2020
@comfine
Copy link

comfine commented Jan 7, 2020

why are all these bugs simply closed? they are still persist and still annoying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests