<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Option-right-arrow or Option-left-arrow at the last or first word of a line jumps caret one too many words"
   href="https://bugs.webkit.org/show_bug.cgi?id=144980">144980</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Option-right-arrow or Option-left-arrow at the last or first word of a line jumps caret one too many words
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X 10.10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Text
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>harada&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=253079" name="attach_253079" title="wrapping text in a div">attachment 253079</a> <a href="attachment.cgi?id=253079&amp;action=edit" title="wrapping text in a div">[details]</a></span>
wrapping text in a div

With caret browsing enabled, pressing Option-right arrow at the beginning of the last word in a line that wraps to the next line causes the caret to jump to the end of the first word on the next line, as opposed to the end of the last word on the starting line. The mirror behavior is observed when pressing Option-left arrow at the end of the first word on a line that is wrapping from the previous line.

When Shift key is held down while pressing Option-right arrow or Option-left arrow to create a selection, it behaves correctly.

* STEPS TO REPRODUCE
1. Enable caret browsing and open the attached HTML file.
2. Move the caret to the beginning of the word “long” on the first line.
3. Press Option-right arrow.

* RESULTS
Actual: Caret jumps to the end of the word “sentence” on the following line.
Expected: Caret jumps to the end of the word “long” on the starting line.
</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>