P.S.
Is it just me or the "Code: [Select]" button of the forum no longer works with the latest firefox ?
"Select" Doesn't work for me either in Firefox 55.0.3, but am not sure if that is a result of an update in Firefox or SMF?
But then I never used the "Select" feature anyhow..
The bug has been reported here.
Simple Machines Forum
Code: [Select] function not working in recent web browsersIt looks like Firefox has added a new feature since 53.
Firefox Release Notes
Firefox 53 for developersThe Selection.setBaseAndExtent() method of the Selection API is now implemented (see bug 1321623).
When you click on
[Select] with Firefox, the console says
(By the time of speaking)
IndexSizeError: Index or size is negative or greater than the allowed amount script.js:1366
smfSelectText
http://forum.tinycorelinux.net/Themes/default/scripts/script.js:1366:4 onclick
http://forum.tinycorelinux.net/index.php/topic,13771.msg133413.html:1:8[/code]
Due to the new function, SMF uses the Safari code at line: 1363 in file script.js
line: 1358 // Firefox at el.
line: 1359 else if (window.getSelection)
line: 1360 {
line: 1361 var oCurSelection = window.getSelection();
line: 1362 // Safari is special!
line: 1363 if (oCurSelection.setBaseAndExtent)
line: 1364 {
line: 1365 var oLastChild = oCodeArea.lastChild;
line: 1366 oCurSelection.setBaseAndExtent(oCodeArea, 0, oLastChild, 'innerText' in oLastChild ? oLastChild.innerText.length : oLastChild.textContent.length);
line: 1367 }
line: 1368 else
line: 1369 {
line: 1370 var curRange = document.createRange();
line: 1371 curRange.selectNodeContents(oCodeArea);
line: 1372
line: 1373 oCurSelection.removeAllRanges();
line: 1374 oCurSelection.addRange(curRange);
line: 1375 }
line: 1376 }
In short:
if (function exist) -> code for Safari
else -> code for the others
There's a
workaround that should fix the behavior.
The workaround:
if (function exist && not firefox) -> code for Safari
else -> code for the others
Is there any chance the workaround can be applied ?
Thanks.