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
Bug: When focussing the editor a <br /> is inserted in the beginning. #321
Comments
In which browser(s) did you test that? |
Firefox 30.0 and 31.0. It does not happen with Internet Explorer 11. Chrome not tested. Test it live at: http://www.klaustukai.lt/7856/upiniu-zuvu-auginimas-namie - click on "komentuoti" and start to type something. |
Sheesh... Sorry, my bad. Anyway, that you are pointing out, is caused by a change you made to the original contents. Just ask firefox and you can see what it says. So it's your changes to the original that made that. |
Wait, a change to the CSS is leading to an insert of a Indeed I added to the original CSS:
However, removing this line and using the original does not help. It is still a bug. |
Do it and I'll try again and reevaluate it. |
Well, I did it already. Tested the file without the css change, same problem. For you I have set the original css file. Feel free to test it here: http://www.q2apro.com/forum/61/windows-desktop-blue-background-default-color-code (click on comment, type...) This is the CSS file: http://www.q2apro.com/forum/qa-plugin/q2apro-sceditor/minified/jquery.sceditor.default.min.css |
Cannot reproduce. |
Problem still exists. Win 7 64 bit, Firefox 31.0. Cursor blinks in the first line, starting to type, it jumps into the second: Test page: http://www.q2apro.com/forum/61/windows-desktop-blue-background-default-color-code |
Cannot reproduce. Check your browser's cache. Make sure you cleared it. |
I have just tested it on two other computers running windows 7 and the latest firefox. All give the same bug. The "cannot-reproduce" label should be assigned for your setup not for my PC nor the PCs of my friends here :) |
Then wait for Sam clarke. If I cannot reproduce, I can't understand how to fix it. |
Took a few attempts but I've managed to reproduce it. The problem is caused by Firefox inserting a As a temporary solution you could use the autofocus option which should work correctly. |
|
I've been looking into this and the cause is the fact it's hidden which for some reason causes Firefox to place the cursor in the wrong place. I'm not sure why Firefox places the cursor in a different position compared to normal but it is doing. I've got a fix that works now I just need to do some more testing. |
As a temporary solution calling clear on the rangeHelper and then calling focus should cause Firefox to create a new range in the right place:
I'm still trying to create a proper fix for this. My original fix won't work as the first time |
Now fixed in the 1.4.6-dev branch. |
Hi Sam, thanks, but it seems not solved yet. Try the steps from the first post above. The site http://www.q2apro.com/forum/94/test-question-to-insert-image holds the latest SCEditor.js code, see file http://www.q2apro.com/forum/qa-plugin/q2apro-sceditor/minified/jquery.sceditor.min.js - but still the same issue. |
You can't use the raw source code without either using an AMD module loader or building it first. It can be built by running the commands:
I've just quickly built the current dev branch and uploaded it here if you want to test it out. |
@samclarke Thanks for your reply. I don't know /yet/ the "AMD module loader" and these commands above. Guess it is Linux. Could you built the file SCEditor.js please, you have built the jquery.sceditor.xhtml.min.js above. The issue above targets SCEditor.js. Thanks! PS: Why can I not use the code directly? Are there dependencies? It's kind of new to me. |
The |
Fix confirmed Working now at http://www.q2apro.com/forum/94/test-question-to-insert-image PS: I see, I have to learn something new (grunt, amd). Thanks for pointing out. |
I am focussing the editor, when the user clicks on a button:
This works, the focus is set to the scedtior field and the cursor blinks at first position. If the users starts to type now, the typing appears in the second line, not in the first as expected.
Checking the HTML source of the editor, it shows:
Test it:
~ Firefox 30.0, Win7 64bit
The text was updated successfully, but these errors were encountered: