Bug 15322 - On designMode=on, <hr> elements should be ignored when moving the caret
Summary: On designMode=on, <hr> elements should be ignored when moving the caret
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on: 12250
Blocks: 9915
  Show dependency treegraph
Reported: 2007-09-29 09:04 PDT by Frederico Caldeira Knabben
Modified: 2012-06-06 12:15 PDT (History)
3 users (show)

See Also:

TC (785 bytes, text/html)
2007-09-29 09:06 PDT, Frederico Caldeira Knabben
no flags Details
Praposed patch (5.17 KB, patch)
2012-06-06 03:44 PDT, Parag Radke
rniwa: review-
rniwa: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederico Caldeira Knabben 2007-09-29 09:04:27 PDT
When designMode=on, using the keyboard or the mouse to move the caret inside the document should ignore <hr> elements.

Today, it seams that the caret is placed in front of the <hr>, but it has a buggy and inconsistent placement.

A TC will be provided for it.
Comment 1 Frederico Caldeira Knabben 2007-09-29 09:06:39 PDT
Created attachment 16454 [details]

This TC makes it easy to spot the problem. It's enough to compare WebKit's results against Firefox 2 or Opera 9.5 results.
Comment 2 Justin Garcia 2007-12-06 13:32:57 PST
We offer a caret position before and after the horizontal rule so that it can be deleted.  The correct solution though is to give horizontal rules "control" selections, like we plan to do for images, that will allow for deletion, among other things.
Comment 3 Parag Radke 2012-06-06 03:44:57 PDT
Created attachment 145985 [details]
Praposed patch

Patch to skip 'hr' element while arrow key navigation. could there be any more such elements which should be skipped? I will report a new bug to make hr control selectable. Please give your feed back.
Comment 4 Ryosuke Niwa 2012-06-06 12:15:01 PDT
Comment on attachment 145985 [details]
Praposed patch

This isn't a right solution. previous/nextLeafWithSameEditability is used for other purposes than just caret movement. Furthermore, as Justin said, we need to add control selection on HR before skipping HR or else users won't be able to delete HR.