Summary: | textarea.caretPos and selectionStart / selectionEnd not implemented | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Vedran Ljubovic <vljubovic> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | maksim |
Priority: | NOR | ||
Version: | 3.2-beta | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Testcase
detection of possible methods |
Description
Vedran Ljubovic
2003-12-29 21:45:48 UTC
I think it'd be better to support gecko's behaviour I agree with Frédéric. Best thing is to support standards. IE's way works, but is quite complicated and nonstandard. I'd rather see getSeletion(), selectionStart and selectionEnd methods implemented. They are in Mozilla and Firefox... Please, please, please, it's so frustrating not to be able to manipulate texte inside <textarea>'s ;o) Created attachment 10018 [details]
Testcase
I would very much like to see this implemented. Currently there is no way to
manipulate text data, which is really hampering me with a current page I'm
working on (which includes a phpbb-type syntax writer with javascript buttons
for bold/italic/underline/font color/etc).
I wrote a testcase for the 3 functions I need implemented..
selectionStart (where the beginning of the selection starts... equals cursor
position if no selection is made)
selectionEnd (where the end of the selection ends... equals cursor position if
no selection is made)
textLength (total characters typed in field)
The testcase is separated into a <textarea> and <input type="text"> with
textboxes representing the appropriate info. The textbox is set to update the
textboxes onKeyPress, but the <input type="text"> requires the Update button to
be pressed.
Created attachment 13535 [details]
detection of possible methods
Agree with all you guys.
I was googling around and didn't find any standart for it.
Attached the test case detecting if method supported by browser.
We really need a way to get current possition of cursor in the text fields.
SVN commit 503345 by orlovich: -Implement selectionStart, selectionEnd, and textLength on textarea -Fix the value on physical wrapped mode to not invent spaces -Proper changed check on updateFromElement, so we don't reset the textarea willy-nilly Among other things, makes phpBB editting buttons work. BUG:71451 BUG:79371 BUG:113217 BUG:109092 M +34 -0 dom/html_form.cpp M +39 -1 dom/html_form.h M +8 -0 ecma/kjs_html.cpp M +2 -1 ecma/kjs_html.h M +54 -1 html/html_formimpl.cpp M +6 -0 html/html_formimpl.h M +138 -2 rendering/render_form.cpp M +16 -0 rendering/render_form.h textLength looks to still be unsupported in 3.5.2... anyway to get that added (see my testcase above) Meant to say for <input type='text'> that is, its working for textareas. |