Attachment 'IE9B1LineEndings.patch'

Download

   1 # HG changeset patch
   2 # User Roger Haase <crosseyedpenguin@yahoo.com>
   3 # Date 1284840846 25200
   4 # Node ID 55b7028e9866aea507bf728729b9455a4d4e73b4
   5 # Parent  7a83cc907f6855d1254a94ab731854b4554539a2
   6 IE9B1 uses \r for line end within textarea; revision works with \r\n, \r (or \n\r), and \n
   7 
   8 diff -r 7a83cc907f68 -r 55b7028e9866 MoinMoin/web/static/htdocs/common/js/common.js
   9 --- a/MoinMoin/web/static/htdocs/common/js/common.js	Fri Jul 23 09:23:59 2010 -0700
  10 +++ b/MoinMoin/web/static/htdocs/common/js/common.js	Sat Sep 18 13:14:06 2010 -0700
  11 @@ -500,7 +500,7 @@
  12      if (txtBox) {
  13          // Calculate the cursor position - IE supports innerText, not textContent
  14          var textLines = txtBox.textContent || txtBox.innerText;
  15 -        textLines = textLines.match(/(.*\n)/g);
  16 +        textLines = textLines.match(/(.*(\r\n|\r|\n))/g);
  17          var scrolledText = '';
  18          for (var i = 0; i < textLines.length && i < jumpLine; ++i) {
  19              scrolledText += textLines[i];

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-09-19 18:38:23, 1.0 KB) [[attachment:IE9B1LineEndings.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.