Closed Bug 38196 Opened 25 years ago Closed 19 years ago

Can't insert caret to JS-added newline in textarea with mouse

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: axel, Assigned: mjudge)

References

Details

(Keywords: helpwanted, Whiteboard: [nsbeta3-])

Attachments

(1 file)

When I add some text ending with an empty line via javascript textarea.value = "hallo\n"; I can't put the caret into that empty line with the mouse, but navigating there with the arrow keys works. After going there with the keys, one can put the caret there with the mouse as well. Axel
Cc'ing Joe since this has to do with the newline-to-br conversion code.
assigning to Joe and setting to m17, doesn't seem like a showstopper
Assignee: beppe → jfrancis
Target Milestone: --- → M17
Status: UNCONFIRMED → NEW
Ever confirmed: true
mike, the description sounds like a selection prob.
Assignee: jfrancis → mjudge
can someone make me a test case? a sample page with this JS? i am having trouble reproducing this but i am probably just confused.
Status: NEW → ASSIGNED
Whiteboard: waiting on test case
Attached file Simple test case. (deleted) —
Cleared whiteboard status. Added test case.
Whiteboard: waiting on test case
Hmmm, from the bug description, it sounds like maybe we're not going through joe's '\n' to <br> conversion. That's just a guess though.
i get different feedback from different folks. if you have: <textarea> test </textarea> do you expect there to be an empty line after the "test"? in gecko, it takes two breaks after text to actually give you an empty line that you can click on. I supply the convoluted logic to do this on the fly as you type - shoudl i also do this when someone pastes in some text that has a newline at the end?
joe can we just do the same thing and put a BR at the end? any feedback yet on your end?
Keywords: correctness, nsbeta3
Target Milestone: M17 → M19
There is a layout bug associated with how these newlines are dealt with. It's highly likely that when that bug is fixed, the editor will never even see the newlines in the example I mention a couple comments above. I CANT FIND THE FRIGGIN BUG NUMBER FOR THAT BUG NOW. AARRRGG!! But Beth and I both know it exists.
m18
Whiteboard: [nsbeta3+]
Target Milestone: M19 → M18
I found 3 possible bugs that might be related to the blocking issue you describe. None of them are nsbeta3+ :), bug 24918 is Futured, bug 2750 was futured and is now shuffled, and the other is a dupe of 2750. I suggest that an advocate @netscape.com/Editor/ intervene on behalf of at least one of these bugs. Setting All/All.
Depends on: 2750
OS: Solaris → All
Hardware: Sun → All
this is also dependent on 24918, since it was futured, this will have to be futured as well
Depends on: 24918
Keywords: helpwanted
Whiteboard: [nsbeta3+] → [nsbeta3-]
Target Milestone: M18 → Future
I'm going out on a limb here and marking this bug WORKSFORME. I don't believe comment 8 is relevant here because we're talking about setting a textarea's value, and not its innerHTML. That aside, I can position the caret in the empty line provided in the testcase.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: