[Webkit-unassigned] [Bug 22025] range.deleteContents() does not collapse the selection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 1 11:14:11 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=22025


digitalpacman at hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |digitalpacman at hotmail.com




------- Comment #10 from digitalpacman at hotmail.com  2009-04-01 11:14 PDT -------
You marked this ticket as invalid but webkit still fails to meet expectations.
If the issue is that the title says range.deleteContents() then change the
title.

This is the method that all "syntax highlight as you type" programs I've seen
on the net use. So I'm trying to modify them to make them work in webkit (none
do).

I tried the suggestions and they don't work, because if you take out all the
alerts you get javascript errors (not on the suggested code)

The issue seems to be that innerHTML = value is asynchronous and doesn't finish
its job when its called. Because directly after I call .find and
.deleteContents() and deleteContents() errors.

Mainly because .find('z') finds nothing.

body.innerHTML = 'z';
window.find('z'); // finds nothing
window.getSelection().getRangeAt(0).deleteContents(); // errors because no
selection

I know I pretty much turned this thread into technical support but we have a
demand for people to use safari and its been over a year now and no one can
figure out how we can possibly support webkit (safari and now chrome)


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list