-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.6
-
None
-
None
-
PHP 5.2.3, MySQL 5.1.3, Microsoft Edge
I updated my forum but the bugfix for Edge was just a replace of the bug by 1 => "Select all" just select one line..
So here is my bugfix :
In prosilver Template directory, the forum_fn.js file.
The function in 3.1.6 Prosilver Template :
function selectCode(a) {
2. 'use strict';
3.
4. // Get ID of code block
5. var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
6. var s, r;
7.
8. // Not IE and IE9+
9. if (window.getSelection) {
10. s = window.getSelection();
11. // Safari and Chrome
12. if (s.setBaseAndExtent) {
13. var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1;
14. try
catch (error)
{ 17. s.setBaseAndExtent(e, 0, e, 1); 18. }19. }
20. // Firefox and Opera
21. else {
22. // workaround for bug # 42885
23. if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) === '<BR>')
26.
27. r = document.createRange();
28. r.selectNodeContents(e);
29. s.removeAllRanges();
30. s.addRange(r);
31. }
32. }
33. // Some older browsers
34. else if (document.getSelection)
41. // IE
42. else if (document.selection)
47.}
Just replace line 17 "s.setBaseAndExtent(e, 0, e, 1);"
by :
r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
And voilĂ !