Closed
Bug 184862
Opened 22 years ago
Closed 19 years ago
document.getElementsByTagName doesn't return correct values on long strings
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
RESOLVED
EXPIRED
mozilla1.5beta
People
(Reporter: mmoy, Assigned: kinmoz)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130
I found this problem and reported it to Piro Shimoda, the author of TabBrowser
Extensions and ContextMenu Extensions and he asked me to report it in Bugzilla.
The text of his email to me is below:
I made sure of the problem...but that is a bug of Mozilla so I cannot
fix this problem.
Now the contextmenu extensions gets selection text from input fields
with a method like following:
var input = document.getElementsByTagName('input')[0];
var selection = input.value.substr(
input.selectionStart,
input.selectionEnd-input.selectionStart
);
but, when there is a long selection, "selectionStart" and "selectionEnd"
are broken as you reported.
Reproducible: Always
Steps to Reproduce:
1. Install ContextMenu Extensions Beta from http://white.sakura.ne.jp/~piro/xul/xpi/ctxextensions.xpi
2. Create an custom script that does _setClipBoard(_selection)
3. Find a page with a textbox [like sending a Yahoo Email] and type a lot of
text; about a paragraph]
4. Execute the custom script.
5. Go into an editor and do a paste.
Actual Results:
Only part of the selection was pasted in.
Expected Results:
Pasted in the whole selection.
I think that Piro's description should be sufficient. If you need more information, post it to the bug entry and I will intermediate with Piro.
Comment 1•22 years ago
|
||
So is document.getElementsByTagName returning the wrong value set, or are
selectionStart and selectionEnd broken? The summary and description seem to
flatly contradict each other...
Comment 2•22 years ago
|
||
->DOM
Assignee: asa → jst
Component: Browser-General → DOM Core
QA Contact: asa → stummala
Comment 3•22 years ago
|
||
This is almost certainly a bug in the selectionStart stuff, which is not fully
implemented yet.
Assignee: jst → jfrancis
Component: DOM Core → Editor: Core
QA Contact: stummala → sujay
Whiteboard: DUPEME
It would be interesting to see if this is fixed after the selectionStart/End
rewrite for bug 88049 has landed on the trunk.
Reporter, do you still see this problem in the latest nightly? Or even 1.7.2? If
not, this bug can be closed. Thanks.
Reporter | ||
Comment 7•20 years ago
|
||
I'll have to write a test on this to check it out. I suspect that I found a
workaround for whatever problem I had two years ago.
Comment 8•19 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 9•19 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in
before you can comment on or make changes to this bug.
Description
•