diff options
| -rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index de51b54e9b..56dfcb04c7 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -184,9 +184,10 @@ function selectCode(a) {  	// Not IE and IE9+  	if (window.getSelection) {  		s = window.getSelection(); -		// Safari +		// Safari and Chrome  		if (s.setBaseAndExtent) { -			s.setBaseAndExtent(e, 0, e, e.innerText.length - 1); +			var l = (e.innerText.length > 1) ? e.innerText.length - 1 : 1; +			s.setBaseAndExtent(e, 0, e, l);  		}  		// Firefox and Opera  		else { | 
