There are many more ways to construct similar cases, especially with script modifying our DOM taken into consideration, but this example demonstrates the problem. But that wouldn't probably be nice, because the caret height will exceed the block frame height (and the caret will potentially run into preceding/following content. If we have a paragraph which has a :first-letter style set to a bigger font size than the rest of the text on the paragraph, we should _probably_ use that font size when placing the caret on an empty block frame, because we expect the text to be bigger for the first letter. This is obviously true for things like images, but let's just consider the simple case of text.
#CARET SYMBOL INDESIGN INVISIBLE PLUS#
If we choose to use the ascent (possibly plus the descent) of the font metrics for the frame for the size of the caret, the caret will practically be invisible when navigating between the images, which would mean that it will fail to serve the latter two purposes.Īs far as data insertion goes, a fundamental problem is that we don't always have a very good idea on how big the content to be inserted will be. Let's consider the case where you have three large images on the same line next to each other, and a CSS rule is imposing a 14px high font size. I _suspect_ that the caret size being set to the height of the frame it's attached to is coming from these purposes. As far as the latter two purposes are concerned, people don't (shouldn't?) care about the height of the caret, they should only care about where on the screen it is, so as long as it's visible compared to its surrounding content, it will serve its purpose. Here's my take on the issue:Ĭarets are used for three purposes: figuring out where data (text, images, etc) insertion goes, and as an aid for navigation and selection. Well, I had a similar discussion with Shaver yesterday. That might also be something similar to bug 577365. > and trying to delete all characters with, results in selecting the last > Positionning the caret before the first character of a field on the 3rd line > - Backspace dont delete the selected characters when using css but no I also found bug 577365 when I was inspecting this. > - Backspace delete characters in previous contentEditable elements until > But there's other bugs showing up in my testcase: So I guess we need to fix the caret positioning for elements with 0 height. The span element in the third row and 2nd column has non-zero width and zero height. The span element in the first row and 2nd column has zero width and zero height. > Found a way to display the caret properly using CSS and. It's still working! So I guess the only problem to look into in this test case is the second element. > The fourth element, seems to work fine (I just added it for completeness). The third element seems to be working fine right now (the caret shows up correctly and typing also works. > impossible to type anything in it, at all. > For the second element, the caret won't show up when focusing and it seems I didn't manage to reproduce the ghost caret problem though. > remain when you type at the wrong moment (when the caret is visible).įor the second test case, the caret doesn't get drawn when you first focus the element, but if you type something in it and then delete it, we'll draw the caret correctly (which is probably no surprise, since the bug happens because of the empty space). Also, when you type something, a 'ghost' caret remnant can > For the second element in the testcase, the caret shows up at the wrong place The caret shows up in the first test case now > For the first element in the testcase, the caret won't show up when focusing > When elements are empty, the caret won't show up for contenteditable elements. So, here's the current situation for the first test case: