public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js in muck-contents-0.2.21 vs public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js in muck-contents-0.2.22

- old
+ new

@@ -73,9 +73,13 @@ while (r.findText(s, b ? -1 : 1, fl)) { r.scrollIntoView(); r.select(); replace(); fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } } tinyMCEPopup.storeSelection(); } else { while (w.find(s, ca, b, false, false, false, false)) {