Opened 7 years ago

Closed 7 years ago

#15546 closed defect (patchwelcome)

SimpleTextarea text selection issues in IE8

Reported by: Michael Dandini Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

I am trying to create a "paste" button for a dijit.form.SimpleTextarea? widget, and I am running into an issue with pasting text in Internet Explorer 8.

When I paste text that has newline characters ("\n"), the text pastes fine, but then when I try to overwrite text with another paste, the entire text area is cleared and replaced with the text I am pasting.

I've confirmed that this issue does not occur when I use a regular textarea.

The four attached files demonstrate the issue, using dojo version 1.6 and 1.7.

Attachments (4)

1-6_textareaIE8_example.html (4.5 KB) - added by Michael Dandini 7 years ago.
1.6 bug demonstration
1-6_textareaIE8_nodojo_example.html (4.1 KB) - added by Michael Dandini 7 years ago.
1.6 demonstration without dojo
1-7_textareaIE8_example.html (4.7 KB) - added by Michael Dandini 7 years ago.
1.7 bug demonstration
1-7_textareaIE8_nodojo_example.html (4.3 KB) - added by Michael Dandini 7 years ago.
1.7 demonstration without dojo

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Michael Dandini

1.6 bug demonstration

Changed 7 years ago by Michael Dandini

1.6 demonstration without dojo

Changed 7 years ago by Michael Dandini

1.7 bug demonstration

Changed 7 years ago by Michael Dandini

1.7 demonstration without dojo

comment:1 Changed 7 years ago by Michael Dandini

Forgot to add one thing: it appears that the text is being re-selected when I click on one of the buttons, overriding my previous selection. Again, this doesn't happen when I use a regular textarea.

comment:2 Changed 7 years ago by Douglas Hays

Resolution: patchwelcome
Status: newclosed

The native textarea has the same behavior is you add onblur='this.value=this.value'. I'm not sure how to workaround this. Probably the selection should be cleared onblur but that would defeat what you are trying to do.

Note: See TracTickets for help on using tickets.