Description

If you create a page with content in many lines instead of one line the wiki parser adds all those lines to one paragraph with different line ids. If you want to have different paragraphs you need to add an empty line.

e.g. typed like this in the text

This
is
a
example

And this is another example

This is a example

And this is another example

If you click on the second example line you get the right line in edit mode.

The sentence above has more than one line id but clicking on any word in that line gives always line=1

Component selection

Details

MoinMoin Version

1.9.3pre

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

This does not fix the problem for predefined text, but fixes a similar problem for tables. I tried to attach a double-click event to the text nodes within pre-formatted text -- it failed with all browsers I tested. Clicking within a table row will position the cursor on the correct row if your browser is Firefox, Chrome, or Safari. If your browser is IE or Opera, the cursor will be positioned near the target row.

Discussion

The js code just puts some js on the parent element of the line-id span. If some p has multiple line-ids, there is still just one handler.


This page has (or had before I started editing) duplicate IDs for line-1 through line-6. This may cause auto scroll to fail on some elements.

Some pages with preformatted test have line numbers like: <span class="anchor" id="line-2-1"> Is that a bug or intended behavior because of some recursive line numbering scheme?

If I add ?action=SlideShow to this pages url and do view source, then the beginning of the body tag is shown below. Note the h1 has no span tag preceding or following it and is not double-clickable with the patched SlideShow.py (not available on this wiki). Firefox misses high by 1 line sometimes - not sure of the cause but slideshow pages with headings may be factor.

  </head>

  <body>
    <h1>
      Description
    </h1>
    <div id="content">
      <span class="anchor" id="line-1"></span>
      <p class="line874">
        If you create a page with content in many lines instead of one line the wiki parser adds all those lines to one paragraph with different line
        ids. If you want to have different paragraphs you need to add an empty line. <span class="anchor" id="line-2"></span><span class="anchor" id=
        "line-3"></span>
      </p>

      <p class="line874">
        e.g. <span class="anchor" id="line-4"></span><span class="anchor" id="line-5"></span><span class="anchor" id="line-6"></span><span class=
        "anchor" id="line-7"></span><span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><span class="anchor" id=
        "line-10"></span><span class="anchor" id="line-11"></span>
      </p>
      <pre>
<span class="anchor" id="line-1-1"></span>This
<span class="anchor" id="line-2-1"></span>is
<span class="anchor" id="line-3-1"></span>a

-- RogerHaase 2010-04-06 17:59:10

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/WrongLineForDoubleClickEdit (last edited 2010-04-12 20:27:34 by RogerHaase)