You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately it seems as if in both Webkit and Firefox this area seems to have been abandoned a while ago. If you look at the files here: http://trac.webkit.org/browser/trunk/Source/WebCore/editing?rev=133820&order=name those are the Webkit files related to editing. Some of these seem not to have had any major editing for 6 years+ (only small patches from users here and there). I'm trying to get around some of the limitations in Javascript, but it's driving me quite insane.
For example, I am currently wrestling with these issues in Webkit:
-- It likes to throw font-elements into the code without being asked for it. Font elements are not part of HTML5 and were deprecated in HTML4.01. There are numerous similar problems like this one.
-- Spaces at the end of paragraphs that are in their own span element (or any other inline element) are not displayed(!) The quick fix for this is CSS code such as:
span::after {
content: '.';
font-size:0;
}
I found that simply by trying it out. It basically adds a period after each span element, and then changes the font-size of that period to zero, so that the users doesn't actually have to see it.
-- A contentEditable=false element inside a contentEditable=true is being deleted as if it were one single character when hitting Backspace or Delete, the way one would expect. However, if three elements are stacked into one another (contentEditable=true inside of contentEditable=false inside of contentEditable=true) and one tries to remove the middle one using the backspace key, somehow the innermost and outermost content-editable elements are fused in an uncontrollable way. The behavior I would expect would be for both inner elements to be removed.
The code around contentEditable seems never to have been finished completely. There are numerous messages saying things such as "FIXME: ... This was done to match existing behavior, but it seems wrong."
Now the question is: If neither Apple nor Google nor Adobe nor anyone else saw any reason to fix any of this since 2006/07, what chances are there that this will happen in the future? Currently it seems almost easier to reprogram the entire contentEditable functionality in Javascript than to rely on the implementation in Webkit. Alternatively, one could try to fix Webkit. My C++ knowledge is quite rusty and given the time it takes to compile Webkit it's not exactly something one would one to do by trying around.
So the idea: What if we instead of trying to make a ton of Javascript implementations to work around the issues there are, try to fix Webkit instead?
Unfortunately it seems as if in both Webkit and Firefox this area seems to have been abandoned a while ago. If you look at the files here: http://trac.webkit.org/browser/trunk/Source/WebCore/editing?rev=133820&order=name those are the Webkit files related to editing. Some of these seem not to have had any major editing for 6 years+ (only small patches from users here and there). I'm trying to get around some of the limitations in Javascript, but it's driving me quite insane.
For example, I am currently wrestling with these issues in Webkit:
-- It likes to throw font-elements into the code without being asked for it. Font elements are not part of HTML5 and were deprecated in HTML4.01. There are numerous similar problems like this one.
-- Spaces at the end of paragraphs that are in their own span element (or any other inline element) are not displayed(!) The quick fix for this is CSS code such as:
span::after {
content: '.';
font-size:0;
}
I found that simply by trying it out. It basically adds a period after each span element, and then changes the font-size of that period to zero, so that the users doesn't actually have to see it.
-- A contentEditable=false element inside a contentEditable=true is being deleted as if it were one single character when hitting Backspace or Delete, the way one would expect. However, if three elements are stacked into one another (contentEditable=true inside of contentEditable=false inside of contentEditable=true) and one tries to remove the middle one using the backspace key, somehow the innermost and outermost content-editable elements are fused in an uncontrollable way. The behavior I would expect would be for both inner elements to be removed.
The code around contentEditable seems never to have been finished completely. There are numerous messages saying things such as "FIXME: ... This was done to match existing behavior, but it seems wrong."
Now the question is: If neither Apple nor Google nor Adobe nor anyone else saw any reason to fix any of this since 2006/07, what chances are there that this will happen in the future? Currently it seems almost easier to reprogram the entire contentEditable functionality in Javascript than to rely on the implementation in Webkit. Alternatively, one could try to fix Webkit. My C++ knowledge is quite rusty and given the time it takes to compile Webkit it's not exactly something one would one to do by trying around.
So the idea: What if we instead of trying to make a ton of Javascript implementations to work around the issues there are, try to fix Webkit instead?
Johannes Wilm
johannes.wilm@sourcefabric.org
The text was updated successfully, but these errors were encountered: