-
Notifications
You must be signed in to change notification settings - Fork 396
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
Selecting a word to create a link with a double click causes the link to be appended to the start of the text. #504
Comments
How are you selecting the text? Are you using the keyboard to highlight the text or double clicking to select the text? Main reason I ask is that the link generation is something handled by scribe rather than by Sir Trev so sometimes it's not Sir Trev thats causing the issue. |
What browser? |
I'm selecting the text by pressing the left mouse button down and moving the cursor - and I'm using Firefox in version 47.0. |
Tested the latest version in windows and osx firefox 7. I'm able to add links using both the keyboard and mouse functionality as expected. Are you getting any javascript errors in the console? |
I using Ubuntu, for your information. I'm not getting any errors in the console, no. The problem ist, that the link text is the same than the URL I entered and not the selected text, that stays like before. |
Does this work for you? That's the scribe demo page. If so I can build a version of Sir Trevor with the latest scribe and see if that works for you. |
Yes, that works perfekt for me. |
Ok. I'll build you a version to test. |
http://madebymany.github.io/sir-trevor-js/example.html works correctly in ubuntu 16.04 firefox 47 |
Thanks, @raffij! But it's not working for me: |
So I type |
Exactly, that I did. I
The result you can see on the screenshot. I also tried selecting the text with the keyboard, but the result was the same. |
What version of ubuntu are you using? |
Sorry can't recreate so not sure how to help. |
@morpheus-87 Do you have any other plug-ins running on firefox? It might be worth double checking the error using firefox safe mode and see if you still get the issue. |
Good thinking @SgtOddball |
Thanks for that hint, @SgtOddball - I just tried it, but it's still the same result. |
@morpheus-87 what version of ubuntu is this? |
Got it! Did you get the warning about adding http before the link? If you did it creates a new entry in front of the highlighted text instead of applying the link to the highlighted text. Sooooo @morpheus-87 can you see if you can add a link as |
Also.... i've got it doing the same if the highlighted word is the first word at the very start. Place a space infront and it works as intended, no space and it borks. |
@SgtOddball is this in firefox too? i've managed to do it once. |
It's Xubuntu 16.04, @raffij. I've also managed to do it once, @SgtOddball - but since the second try, it was again the same. |
@raffij Yes, sorry should have confirmed Firefox 47.0.1 on Win 10. It's strange how after it throws the error the first time round, it then works ok. I've also double checked against the current demo of scribe and it refuses to misbehave (but then the content was already present). |
@morpheus-87 Xubuntu 16.04 firefox 47 is working correctly on my system |
Thanks for that screencast, @raffij! I think, I found the point, that's causing the problem: When I select a word by double-clicking it, I run into problems - when I select it by clicking the mouse and moving the cursor, everything works as expected. Can you confirm that? |
@morpheus-87 agreed. Renaming the issue. |
It's a bug in scribe probably http://guardian.github.io/scribe/ can reproduce everytime. |
For me, everything is working fine on the scribe demo page. |
Ok, I can reproduce, what you did in the screencast. I just selected the text, that was already there on the demo page, by double-click and there was no problem. |
Ok it's a firefox 47 problem, doesn't appear platform specific. Raise a bug on: |
Replicated in firefox 65. |
When I have the text
hello
in my text block, the DOM tree looks likeWhen I then select the text and add a link to
http://google.de
, the resulting DOM tree isThe text was updated successfully, but these errors were encountered: