Skip to main content
Select Code Issue 2.0 Beta 1 Started by Hj Ahmad Rasyid Hj Ismail · · Read 9 times 0 Members and 1 Guest are viewing this topic.

Select Code Issue 2.0 Beta 1

By the way, select code, jump the page up, not staying in its place.  :wink:

Re: Select Code Issue 2.0 Beta 1

Reply #1

I noticed the select jump, also, on my site, so it's not just here.

Re: Select Code Issue 2.0 Beta 1

Reply #2

Fixed


Re: Select Code Issue 2.0 Beta 1

Reply #4

At the end of the JS function elkSelectText in script.js ... add return false;

While fixing that, is select even a useful thing now, how about just copy to clipboard instead?

Re: Select Code Issue 2.0 Beta 1

Reply #5

No need for me to fix, if you do that! :)
That would be so much better.

Re: Select Code Issue 2.0 Beta 1

Reply #6

Test implemented here (be sure to flush your browser cache for the site)

It will show [Copy] on the code block.  IF your site is not httpS then it will fallback to the old [Select] style as copy to clipboard is not available on insecure sites.

Re: Select Code Issue 2.0 Beta 1

Reply #7

@Spuds
Tested and works. Great idea.  :cool:
Can you post the changes? Or better yet, if lots of edits, make an addon package?


Re: Select Code Issue 2.0 Beta 1

Reply #8

Quote from: "ScottJB" – Can you post the changes? Or better yet, if lots of edits, make an addon package?
Sorry, no way I'm making an addon for that.  The changes are available here: https://github.com/elkarte/Elkarte/pull/3862/changes/488ab947c447e3d8b56fb94b7601c3e478f1a54f

Re: Select Code Issue 2.0 Beta 1

Reply #9


Then I'll have to wait a bit, as I can barely make sense of Github edits....LOL
I was lucky to get the one for the board showing without breaking things.  :cheesy: