Discourse breaks select & drag in chrome
-
One of the occasional things I use on the internet, when someone writes something I don't understand, I double click what they wrote to highlight it, and then drag it to a new tab to create a search for that selection.
here is an example:
Obviously you cant see the cursor because windows doesn't think that is important.
On Discourse, this doesn't work. selecting a small piece of text works, but trying to drag it to a new tab to search just starts a new selection. this is on chrome Version 36.0.1985.125 m
this is the bitch about discourse line, marking the cut-off between constructive information and "discourse is rubbish" rants.
-
I already bitched about this a while back. Their response: it's not a big deal , and if you really care, you can just disable "quote reply" box in settings.
Remains one of my larger annoyances to this day.
-
I already bitched about this a while back. Their response: it's not a big deal , and if you really care, you can just disable "quote reply" box in settings.
Remains one of my larger annoyances to this day.
secondary bug - user expectation is that the search feature doesn't work. Hence, user does not search for similar reports. Hence, duplicate reports.
Brillant.
-
This is just an extension of the "you can't really do anything with selected text other than use the 'Quote' button, because it's 2014 and they somehow fucked up text selection" bug people have been reporting for ages.
-
I've since learned to right click the selected text. In the context menu, there's an option to "Search Google for '{WHAT YOU SELECTED}'". It's not perfect, but at least you won't have to wait for Dicsourse to be fixed.
-
Hearing @algorythmics's cry of helpless desperation, my stone heart was finally moved enough to get off my butt and fix this. In other words, I was bored.
For now, just paste this into terminal. If it turns out ok, we can wrap it into a userscript.
(function () { $(document).on("mousedown.quote-button", function(e) { var selection = window.getSelection(); if (selection.type === "Range" && selection.containsNode(e.target, true)) { e.stopImmediatePropagation(); } }); var events = $._data(document, "events").mousedown; events.unshift(events.pop()); })();
So, less than a day after nagging you to death about Discourse meta, I go out and waste an hour of my time hacking at it myself. Who's the real WTF now?
-
Don't tell them this work around, they will remove it from the context menu by creating their own context menu.
-
-
Don't tell them this work around, they will remove it from the context menu by creating their own context menu.
Shit don't give them another browser feature to replace.
-
OK, I tried to dump this thing into a tampermonkey script and give it a go. It refuses to activate on thedailywtf site.
// ==UserScript== // @name Discourse quote button // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description enter something useful // @match *what.thedailywtf.com* // @copyright 2014+, You // ==/UserScript== (function () { $(document).on("mousedown.quote-button", function(e) { var selection = window.getSelection(); if (selection.type === "Range" && selection.containsNode(e.target, true)) { e.stopImmediatePropagation(); } }); var events = $._data(document, "events").mousedown; events.unshift(events.pop()); console.log("Discourse quote button fixed"); })();
Nothing special, just dumped it into the default template.
It's been a while since I used tampermonkey, it feels a lot buggier than it used to.So, you guys are always tampering with scripts on Discourse. Any ideas?
-
Don't tell them this work around, they will remove it from the context menu by creating their own context menu.
@dhromed, @PJH: Is there any way we could make a category that is hidden from the Discourse creators who have staff level privileges here? That way we can share workarounds and hacks in a private space that they cannot access, so they don't know what to break.
-
Try changing the
@match
tohttp://what.thedailywtf.com/*
. That might do it.
-
Try changing the @match to http://what.thedailywtf.com/*. That might do it.
That was it. I tried
http://what.thedailywtf.com/
and*what.thedailywtf.com*
, but not that. What a bunch of crap.
-
They'd probably have to be de-adminned for that.
-
Don't tell them this work around, they will remove it from the context menu by creating their own context menu.
What context menu? I don't understand.
-
… and who would that inconvenience?
-
@dhromed, @PJH: Is there any way we could make a category that is hidden from the Discourse creators who have staff level privileges here?
No.
Nearest you could probably get is a multi-user PMs, which is more obfuscation than a true solution. I've no idea what the limit on participants is however...
What context menu? I don't understand.
Highlight some text (that isn't a hyperlink) on the page and right click. That menu.
-
-
Not any of us. I'm just stating a point of fact.
But I assume it wasn't @PJH or @dhromed who made them admin, so it may not be up to them to remove admin.
-
Highlight some text (that isn't a hyperlink) on the page and right click. That menu.
Yeah, but that's not what I did... I short-circuited their handler so you can drag & drop selected text.
-
Not everything's about you, cartman!
I've since learned to right click the selected text. In the context menu, there's an option to "Search Google for '{WHAT YOU SELECTED}'". It's not perfect, but at least you won't have to wait for Dicsourse to be fixed.
-
They were talking about the workaround I suggested in post 5. Before you weird-ass script.
-
But I assume it wasn't @PJH or @dhromed who made them admin, so it may not be up to them to remove admin.
This.
Yeah, but that's not what I did... I short-circuited their handler so you can drag & drop selected text.
The context menu comment was about the highlight -> right click -> Search Google for "highlighted text" option available to most people as a workaround for the failure of Discourse to (by default) allow highlight drag.
-
They'd probably have to be de-adminned for that.
Maybe. Could possibly be done with a custom group, though. Is there a reason to keep any of them on as admins at this point?
-
It's so codinghorror can read your pms.
-
Maybe. Could possibly be done with a custom group, though. Is there a reason to keep any of them on as admins at this point?
Good question. We should probably elevate it to @apapadimoulis, since I bet he's the one that made them admins to begin with.
-
Ok, ok, I'm cancelling cartman appreciation day and sending back all the food and strippers. I hope you're happy.
-
Maybe. Could possibly be done with a custom group, though.
No. Admins can see all groups (and the contents of them) regardless of whether they would otherwise have permission to see them or not. e.g. I was able to create a test group that only members of
area_deu
could use (with the implication that no-one outside of that group would even know of its existence.) I could still see it and post to it.
-
Good question. We should probably elevate it to @apapadimoulis, since I bet he's the one that made them admins to begin with.
I think it made sense originally, so they could get things working for him. I doubt they've done any legitimate admin stuff for quite a while. Seems like they should be downgraded to regular schlubbs. If the need arises, @apapadimoulis could always re-elevate them for a limited engagement.
-
I think it made sense originally, so they could get things working for him. I doubt they've done any legitimate admin stuff for quite a while. Seems like they should be downgraded to regular schlubbs. If the need arises, @apapadimoulis could always re-elevate them for a limited engagement.
But is @apapadimoulis listening? We don't exactly hear from him all that often.
-
But is @apapadimoulis listening? We don't exactly hear from him all that often.
I think you need to call him correctly:
Please hear us, @apapadimoulis, Esq, MD, FACS, MBA, eMBA!
-
I think you need to call him correctly:
Please hear us, @apapadimoulis, Esq, MD, FACS, MBA, eMBA!
Ah, yes! I should really add that to my book of incantations.
-
I do think it's nice to have the creators have full access, mostly in like a "support" role or something? Haven't had any big issues as of late, but we could get a weird bug come in an update (especially once we do that huge import from @ben_lubar) , and it'd be nice if they can just look at our data directly instead of spending a lot of time trying to reproduce on a sandbox.