Code: Select All Jumps To Top Of Page?

Need help with the site/forum/pets? Ask questions and get help from other members here.

Re: Code: Select All Jumps To Top Of Page?

Postby .lucifer » Fri May 12, 2017 2:12 pm

Thank you all for the advice! For now, I think I'll try switching to another browser. I know code boxes work in internet explorer (the browser I use for drawing in the oekaki) but I will try @Nanami's browser before switching to IE or Firefox.
I do hope someone figures out a way for this to work in chrome though! (im quite attached, pff)
Image
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
xxxxxxxxxxxxxxx
Image

╭──────────╮
zave/eve
he/him | artist
» avidae
» ravlins
the shrike to
your sharp and
glorious thorn

╰──────────╯

<-- lineart by phoenix-alikan
User avatar
.lucifer
 
Posts: 6159
Joined: Tue Mar 26, 2013 10:45 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby *JACKAL* » Fri May 12, 2017 6:16 pm

Ah! Not the fact that I spilt coffee on my computer then. And on the chrome one too. Again.












Image
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌













▌█
▌█
▌█
▌█
▌█
▌█
▌█
▌█

Image











Image
Image..Image..Image..Image..Image..Image..Image..Image
User avatar
*JACKAL*
 
Posts: 7573
Joined: Thu Jun 16, 2011 5:37 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby Nolan » Fri May 12, 2017 11:03 pm

͏l͏ucifer wrote:Thank you all for the advice! For now, I think I'll try switching to another browser. I know code boxes work in internet explorer (the browser I use for drawing in the oekaki) but I will try @Nanami's browser before switching to IE or Firefox.
I do hope someone figures out a way for this to work in chrome though! (im quite attached, pff)

Don't believe tablets work on Oekaki with the Maxthon browser, just a heads up.
User avatar
Nolan
 
Posts: 4767
Joined: Mon Dec 12, 2011 10:54 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby kartharon » Sun May 14, 2017 2:20 am

      & i've heard that tablets work much better on the firefox browser.

      just an update, i am having the same problem as you on the firefox browser. i've never experienced this before on either google chrome or firefox so i guess i'm not sure what's going on. c:
User avatar
kartharon
 
Posts: 7796
Joined: Fri Jan 15, 2010 12:30 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby Aaron✦ » Sun May 14, 2017 8:50 pm

kartharon wrote:
      & i've heard that tablets work much better on the firefox browser.

      just an update, i am having the same problem as you on the firefox browser. i've never experienced this before on either google chrome or firefox so i guess i'm not sure what's going on. c:

    I've been having the issue in chrome and it's also now happening in firefox for me as well. It may have changed when I updated my firefox? Did it stop working after you updated firefox?
Image
.
.
.
.
.
.
.......

x
x

[
x
x

1 pet to go!icon
need help?guidesfor newbies


he/xey - no they/them
Image Image Image

x
x

]
User avatar
Aaron✦
Global Moderator
 
Posts: 15519
Joined: Sun Jul 07, 2013 8:37 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby .lucifer » Sun May 14, 2017 8:55 pm

I switched to my old, not updated version of firefox, and codeboxes now work fine, so i do think that it has something to do with a recent update for chrome and/or firefox.
Image
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
│█
xxxxxxxxxxxxxxx
Image

╭──────────╮
zave/eve
he/him | artist
» avidae
» ravlins
the shrike to
your sharp and
glorious thorn

╰──────────╯

<-- lineart by phoenix-alikan
User avatar
.lucifer
 
Posts: 6159
Joined: Tue Mar 26, 2013 10:45 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby kartharon » Wed May 17, 2017 9:41 am

        Irisidium wrote:
kartharon wrote:
      & i've heard that tablets work much better on the firefox browser.

      just an update, i am having the same problem as you on the firefox browser. i've never experienced this before on either google chrome or firefox so i guess i'm not sure what's going on. c:

    I've been having the issue in chrome and it's also now happening in firefox for me as well. It may have changed when I updated my firefox? Did it stop working after you updated firefox?



      sorry about the late response. it stopped working after i updated my firefox and installed the latest version. i know that my google chrome browser also has an update, but i haven't updated it yet.
User avatar
kartharon
 
Posts: 7796
Joined: Fri Jan 15, 2010 12:30 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby nickjr » Tue May 30, 2017 10:33 am

I'm an admin on another phpBB forum (no link, sorry; private forum) and the Select all works there. phpBB version 3.1.10 over there. From CS's main CSS page, it looks like CS is on phpBB version 3.0.x

I put "test" into a codebox on that forum and CS and then compared the HTML. The HTML of the links themselves aren't different, but the surrounding code is a little different. I can look up what the different tags are for, and I can look at the CSS later but if someone knows off the top of their head, that would be great

(codeboxes used here only so you can read more easily)
CS Select all wrote:
Code: Select all
<div class="content">
   <dl class="codebox">
      <dt>
         Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
      </dt>
      <dd>
         <code>test</code>
      </dd>
   </dl>
</div>

other forum Select all wrote:
Code: Select all
<div class="content">
   <div class="codebox">
      <p>
         Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
      </p>
      <code>test</code>
   </div>
</div>


(if you quote this and you're on Chrome: Chrome will tell you there's unusual code on the page when you try to preview the post, but you should be able to post just fine)

My initial thought is that maybe CS is using deprecated tags that browser developers are dropping support for, but I don't know if that even makes sense. My second thought after looking at the code is that the <dd> tag works differently now, whatever it is...
Spread the word to end the word, because discrimination based on perceived or actual IQ/"intelligence" is no better than discrimination based on race, gender, etc.

Context, consistency, and clear antecedents are golden.
I neither read nor speak between the lines. But I will analyze your language.


Often on phone |||| Timezone: EDT/EST (CS Time -4/-5) |||| Very turbulent life IRL
Intentionally turned off signatures; PMs off June 2013 - June 2020, may turn off again later
Image
Banner by Moonflight Image It's been over 10 years since my request, and I still love it. Thank you so much!

Character in avatar is from CS's 2015 Sucrose City summer event. Border made by me in MS Paint, Windows 8.1 xD
User avatar
nickjr
 
Posts: 7083
Joined: Thu Sep 25, 2008 10:54 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: Code: Select All Jumps To Top Of Page?

Postby nickjr » Wed May 31, 2017 2:37 pm

I found this. It's related, but not directly related.

Also found the selectCode() method in the .js files (looks like they come with phpBB).
CS selectCode() wrote:
Code: Select all
function selectCode(a)
{
   // Get ID of code block
   var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];

   // Not IE and IE9+
   if (window.getSelection)
   {
      var s = window.getSelection();
      // Safari
      if (s.setBaseAndExtent)
      {
         s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
      }
      // Firefox and Opera
      else
      {
         // workaround for bug # 42885
         if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
         {
            e.innerHTML = e.innerHTML + '&nbsp;';
         }

         var r = document.createRange();
         r.selectNodeContents(e);
         s.removeAllRanges();
         s.addRange(r);
      }
   }
   // Some older browsers
   else if (document.getSelection)
   {
      var s = document.getSelection();
      var r = document.createRange();
      r.selectNodeContents(e);
      s.removeAllRanges();
      s.addRange(r);
   }
   // IE
   else if (document.selection)
   {
      var r = document.body.createTextRange();
      r.moveToElementText(e);
      r.select();
   }
}

other site selectCode() wrote:
Code: Select all
function selectCode(a) {
   'use strict';

   // Get ID of code block
   var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
   var s, r;

   // Not IE and IE9+
   if (window.getSelection) {
      s = window.getSelection();
      // Safari and Chrome
      if (s.setBaseAndExtent) {
         var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
         try {
            s.setBaseAndExtent(e, 0, e, l);
         } catch (error) {
            r = document.createRange();
            r.selectNodeContents(e);
            s.removeAllRanges();
            s.addRange(r);
         }
      }
      // Firefox and Opera
      else {
         // workaround for bug # 42885
         if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) === '<BR>') {
            e.innerHTML = e.innerHTML + '&nbsp;';
         }

         r = document.createRange();
         r.selectNodeContents(e);
         s.removeAllRanges();
         s.addRange(r);
      }
   }
   // Some older browsers
   else if (document.getSelection) {
      s = document.getSelection();
      r = document.createRange();
      r.selectNodeContents(e);
      s.removeAllRanges();
      s.addRange(r);
   }
   // IE
   else if (document.selection) {
      r = document.body.createTextRange();
      r.moveToElementText(e);
      r.select();
   }
}


Unfortunately, I don't actually know JavaScript |||OTL I can guess what's going on, but I don't actually know, so... Can anyone figure out what's going on?
Spread the word to end the word, because discrimination based on perceived or actual IQ/"intelligence" is no better than discrimination based on race, gender, etc.

Context, consistency, and clear antecedents are golden.
I neither read nor speak between the lines. But I will analyze your language.


Often on phone |||| Timezone: EDT/EST (CS Time -4/-5) |||| Very turbulent life IRL
Intentionally turned off signatures; PMs off June 2013 - June 2020, may turn off again later
Image
Banner by Moonflight Image It's been over 10 years since my request, and I still love it. Thank you so much!

Character in avatar is from CS's 2015 Sucrose City summer event. Border made by me in MS Paint, Windows 8.1 xD
User avatar
nickjr
 
Posts: 7083
Joined: Thu Sep 25, 2008 10:54 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Who is online

Users browsing this forum: PansyPossum, prinnie234 and 38 guests