Page 1 of 1

CODE: 'Select All' not working | A simple coding fix

Unread postPosted: Mon, 6 July 2020, 4:24 pm
by MOC
Well it was discovered that the "SELECT ALL" option to select all text placed in the BBCode (code) was not working here for newer browsers such as Opera, Chrome, Microsoft Edge, and Firefox. It would send the page to the top and put a # at the end of the URL, instead of selecting the code as required. Although it was still working in some older browser versions and IE (Internet Explorer).

To fix, find this file in your template directory: forum_fn.js

On line number 210, find this line:
Code: Select all
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);

Replace with this line:
Code: Select all
s.setBaseAndExtent(e, 0, e.parentNode, 1);

This was the simple fix for the "Select All" BBCode feature in our beloved forums; this has fixed the BBCode operation on all four of the browsers just mentioned.

Soon, I will need to do a post on several new search features added to MOC Forums. Advanced search features have come to the results list, so maybe I need to explain these new and advanced search features. Until then, start a keyword search and explore the new features already added to our search engine for yourself! A few more features and tweaks are still planned, but right now you can already enjoy powerful, precision, keyword and author research features here at MOC Forums.

Enjoy your day, cheers!