'Select All' Redirects To Top of Page

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

'Select All' Redirects To Top of Page

Post by Jade23 » Tue May 16, 2017 8:31 am

It's basically what the title says. Our 'Select All' button for the code box we use redirects the user to the top of the page when they click it. One day it was working, then it just randomly stopped working. I've checked the style to make sure the .js file was there. Checked the code in it too to make sure it was correct. Went into the overall header and checked that too. Everything seems to be in place but I'm not sure why it stopped working? Apparently all my users are experiencing this glitch.

Example : http://standingtrials.com/viewtopic.php ... 906#p43301

User avatar
david63
Registered User
Posts: 16168
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: 'Select All' Redirects To Top of Page

Post by david63 » Tue May 16, 2017 9:12 am

Perhaps an obvious question but does it work correctly with the default prosilver style?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

.m.
Registered User
Posts: 438
Joined: Wed Nov 04, 2009 8:39 pm

Re: 'Select All' Redirects To Top of Page

Post by .m. » Tue May 16, 2017 9:25 am

edit: please ignore this post

looks like below code segment is used twice (repeated)
window.onunload = function()
{
for (var i = 0; i < onunload_functions.length; i++)
{
eval(onunload_functions);
}
};
Last edited by .m. on Wed May 17, 2017 2:28 am, edited 1 time in total.

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Wed May 17, 2017 12:35 am

So I tried prosilver and it's working there. Also tried to find this duplicate code and couldn't find it? I'm not seeing any duplication.

So if it's working in prosilver then does that mean a broken mod or something?

.m.
Registered User
Posts: 438
Joined: Wed Nov 04, 2009 8:39 pm

Re: 'Select All' Redirects To Top of Page

Post by .m. » Wed May 17, 2017 1:55 am

sorry, there is no duplicated code. please see suggested fixes here [esp. this response]

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Wed May 17, 2017 2:55 am

So I've tried what you've suggested but it doesn't seem to be working. Also, I've troubleshot it to being a browser issue potentially? On Opera, the 'Select All' feature works but on Chrome, it directs users back to the top. It's kind of strange because multiple users are complaining about the same issue of being redirected to the top when attempting to select all the code in a code box. But to have the same browser problem? Is this maybe a bad update or something? Not too sure.

.m.
Registered User
Posts: 438
Joined: Wed Nov 04, 2009 8:39 pm

Re: 'Select All' Redirects To Top of Page

Post by .m. » Wed May 17, 2017 3:11 am

of course, it is related to browsers update (in general, they are set with automatic updates !)
and style coder needs to fix the functions used in the style. have you also tried this suggestion ?

the same error exists at present on mozillazine forums prosilver style ..

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Wed May 17, 2017 3:28 am

Yes, I've tested all those suggestions on Chrome browser and the problem persists.

.m.
Registered User
Posts: 438
Joined: Wed Nov 04, 2009 8:39 pm

Re: 'Select All' Redirects To Top of Page

Post by .m. » Wed May 17, 2017 3:53 am

GreaseMonkey script worked for me on your board

btw, have you purged the cache after changing the code in the script
also have you hard refreshed your browser (eg. press CTRL + F5) ..

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21136
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: 'Select All' Redirects To Top of Page

Post by Mick » Wed May 17, 2017 5:42 pm

Jade23 wrote:
Wed May 17, 2017 12:35 am
So I tried prosilver and it's working there . . . So if it's working in prosilver then does that mean a broken mod or something?
More likely the style but you can try disabling all of your extensions and see if the problem goes away - if it does then re-enable them one at a time until you find the culprit. There are no mods in 3.1.
"The more connected we get the more alone we become" - Kyle Broflovski

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Tue Jun 20, 2017 10:32 am

Where would I place that code for Greasemonkey script?

------ This issue is still happening

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21136
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: 'Select All' Redirects To Top of Page

Post by Mick » Tue Jun 20, 2017 12:09 pm

Jade23 wrote:
Wed May 17, 2017 12:35 am
So I tried prosilver and it's working there
Has this changed, prosilver no longer works?
"The more connected we get the more alone we become" - Kyle Broflovski

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Tue Jun 20, 2017 12:38 pm

Correct. Prosilver no longer works.

Jade23
Registered User
Posts: 71
Joined: Mon Sep 22, 2014 2:40 pm

Re: 'Select All' Redirects To Top of Page

Post by Jade23 » Tue Jul 04, 2017 4:20 am

Anyone?

___________
Edit
___________

Nevermind. Apparently it's fixed? Not sure what I did to make it work or if something else did it but I think it's safe to say that I hate coding. Thanks for the help guys. :)

Locked

Return to “[3.1.x] Support Forum”