Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#3752 closed defect (fixed)

textarea with autoSave - can't add a newline to textarea

Reported by: ptbrunet Owned by: haysmark
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

With textarea in autoSave mode, pressing Enter doesn't add a newLine to the text area. Text areas should allow entry of multiple lines. I tested this in the InlineEditBox test case.

Change History (13)

comment:1 Changed 12 years ago by bill

Owner: changed from bill to Douglas Hays

comment:2 Changed 12 years ago by Douglas Hays

Owner: changed from Douglas Hays to haysmark

comment:3 Changed 12 years ago by haysmark

Affects IE and Safari. FF works but seems a bit unstable.

comment:4 Changed 12 years ago by haysmark

Setting autoSave=false might be the best thing to do for textareas. Now though the save button isn't enabling at all in FF, and IE and Safari don't enable the button until you make two changes to the textarea.

comment:5 Changed 12 years ago by haysmark

Status: newassigned

comment:6 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [9770]) For the TextArea? example in test_InlineEditBox set autoSave set to false, enabling user to press Enter and get a newline. Make InlineEditBox? enable the save button onChange with autoSave set to false. Fixes #3752.

Patch from Mark Hays (IBM, CCLA on file)

comment:7 Changed 12 years ago by bill

Resolution: fixed
Status: closedreopened

I checked this in but now looking at FF the save button for TextArea? doesn't get enabled unless you tab away. (It should turn on as soon as you type anything.)

Safari seems to be seeing a number of problems too.

comment:8 Changed 12 years ago by haysmark

The iframe in FF is blocking the onkeypress from bubbling up to the InlineEditBox?, so the save button does not enable on key press like in the other browsers. Will try the event creation hack, pulled from ComboBox?, to get the event out of the iframe:

var te = document.createEvent("KeyEvents");			te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);
element.dispatchEvent(te);

comment:9 Changed 12 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [9794]) Make FF TextArea? propogate its onkeypress events beyond its iframe, enabling InlineEditBox? to listen to key presses from FF TextAreas?. Fixes #3752. Patch from Mark Hays (IBM, CCLA on file)

comment:10 Changed 12 years ago by haysmark

Resolution: fixed
Status: closedreopened

TextArea? should eat the Enter key with dojo.stopEvent(). While the above revisions are all great and fix bugs with autoSave=false, this would truly address the original problem.

comment:11 Changed 12 years ago by haysmark

Pending #3899.

comment:12 Changed 12 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [9898]) TextArea? prevents Enter from bubbling, enabling InlineEditBox? autoSave to work. Fixes #3752. Patch from Mark Hays (IBM, CCLA on file)

comment:13 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.