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

Text selection inside links #109

Open
unxed opened this issue Jan 28, 2014 · 29 comments
Open

Text selection inside links #109

unxed opened this issue Jan 28, 2014 · 29 comments

Comments

@unxed
Copy link

unxed commented Jan 28, 2014

Opera 12 has an ability to select text placed inside A tag. It would be nice to have the same option included in Otter Browser.

@Stng84
Copy link

Stng84 commented Jan 28, 2014

Fore surely, it's "must have" feature

@Emdek
Copy link
Member

Emdek commented Jan 28, 2014

This one is not really doable. :-/
It is issue in WebKit itself, I have no idea if they even consider that as bug...
And I doubt if it would be possible with some custom JS based workarounds.

@Emdek Emdek closed this as completed Jan 28, 2014
@srgloureiro
Copy link

+50 to this feature!

@Emdek
Copy link
Member

Emdek commented Jan 28, 2014

You can try to report it upstream (I couldn't fin existing ticket for this issue) and post link to issue in comments.
https://bugs.webkit.org/

@unxed
Copy link
Author

unxed commented Jan 29, 2014

Is it possible to implement such behavour on a top of Gecko engine?

@Emdek
Copy link
Member

Emdek commented Jan 29, 2014

@unxed, I guess it has to be implemented in engine itself, AFAIK only Presto allowed this behavior...
And first we would need Qt bindings for Gecko, previous attempt wasn't finished and is very outdated. :-/

@beastie1
Copy link
Contributor

beastie1 commented Mar 9, 2014

@Emdek, I found this blog post today. It is about an extension for Blink-Chropera that supposedly allows selection inside hyperlinks.

Considering the origin of Blink, could a similar workaround be coded for Otter? Would it be too much trouble? Do you think it may have a negative impact on performance?

@Emdek
Copy link
Member

Emdek commented Mar 9, 2014

@beastie1, interesting.
If it works (haven't tested yet) then it should be doable, but it will be hard to duplicate since source is a bit obfuscated.

@srgloureiro
Copy link

From my experience, I think the Old Opera works like this:

  • If you pick and drag the mouse horizontally (I am working in GDI graphics and I know that this can not be done without considering some kind of margin between the the initial pick y and the y during the mouse dragging), it is a text selection
  • If you pick in another direction it is a dragging of the link.

@vlad-ivanov-name
Copy link

@Emdek

Source can be easily deobfuscated, I'll post a gist with the deobfuscated version today.

@vlad-ivanov-name
Copy link

http://pastebin.com/781MeCvX

Haven't tested it. If javascript-based solution is acceptable, I can write something like this. By the way, should script-based link text selecting be optional? Maybe there should be some options in about:config.

@Emdek
Copy link
Member

Emdek commented Mar 10, 2014

@resetnow, I would like to avoid adding option for that.
If such solution would simply always work then it could be embedded in QtWebKit backend.
If there would be occasional issues then it could be shipped as user script that could be enabled by user.

@vlad-ivanov-name
Copy link

@Emdek, I think this script will work almost always. However, native solution would be better, but looks like there's no way to implement it without modifying webkit sources.

@Emdek
Copy link
Member

Emdek commented Mar 11, 2014

@resetnow, maybe Opera developers will someday implement that in Blink. ;-)
For now such workaround should be enough.

@rplnt
Copy link

rplnt commented Jul 1, 2014

The blog linked above seems to be updated with this extension https://gist.github.com/Griever/5005165 I haven't tested it.

I also want to mention I find this a quite serious usability issue (more important than missing mail client for example). I see how it's not feasible to maintain own WebKit fork (assuming it's reasonably fixable in there) at this stage, but I wouldn't close this just yet (unless the js workaround works properly).

@Emdek
Copy link
Member

Emdek commented Jul 1, 2014

@rplnt, this version looks more promising.
About closing upstream issues, we should have wiki page listing known upstream issues, with links to upstream bug reports.

@Emdek
Copy link
Member

Emdek commented Jan 28, 2017

Since we have User Script for some time already we could do it as bundled and enabled by default User Script.
But first we would need some JS code with proper license...

@pierreporte
Copy link
Contributor

pierreporte commented Jan 28, 2017

@resetnow proposed to do it in his comment. He seems to be active on Github so maybe he could do it?

@vlad-ivanov-name
Copy link

The script mentioned above (https://gist.github.com/Griever/5005165) works just fine for me, at least with QtWebEngine. It's also MIT licensed, is this license compatible with Otter?

@pierreporte
Copy link
Contributor

pierreporte commented Jan 28, 2017

According to the GNU project, the MIT license is a name given to either the X11 license and the Expat. Both are compatible with the GPL v3 that Otter uses.

https://www.gnu.org/licenses/license-list.html#X11License
https://www.gnu.org/licenses/license-list.html#Expat

@pierreporte
Copy link
Contributor

If we are going to provide official user scripts, it may be a good idea to indicate which scripts are provided by default and are officially supported, and which are not.

@Emdek
Copy link
Member

Emdek commented Jan 29, 2017

Right, somehow I remembered that there was only some totally unreadable JS code to solve that...
And now I don't even see link to that solution in this ticket, probably I've seen it only during early research.

@unxed
Copy link
Author

unxed commented Jan 29, 2017

http://pastebin.com/781MeCvX

this one?

@Emdek
Copy link
Member

Emdek commented Jan 29, 2017

@unxed, no, I remember something obfuscated or at least minified, either someone gave me link outside this ticket or I've found it on the net.

@Emdek
Copy link
Member

Emdek commented Jan 29, 2017

@unxed, nope, and there is no point for looking it up now. ;-)

@vlad-ivanov-name
Copy link

A previous version of the extension mentioned above (which is now removed) was obfuscated.

@beastie1
Copy link
Contributor

You're talking about the one mentioned here.

@Emdek
Copy link
Member

Emdek commented Jan 29, 2017

@resetnow, @beastie1, yeah, probably that one.

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

8 participants