Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#5249 closed defect (fixed)

InlineEditBox, entering whitespace should show 'noValueIndicator' to allow user to edit again

Reported by: guest Owned by: bill
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: InlineEditBox dijit Cc:
Blocked By: Blocking:


When using the InlineEditBox?, if a user enters only whitespace and clicks save the value is set to ' ' which when rendered as HTML doesn't have any width, it therefore becomes impossible for users to edit again. As a solution the _setDisplayValue function could ignore whitespace when determining if it should show the 'noValueIndicator'. The change below uses dojo.string.trim to determine if the value is blank.

_setDisplayValue: function(/*String*/ val){
  // summary: inserts specified HTML value into this node, or an "input needed" character if node is blank
  this.displayNode.innerHTML = dojo.string.trim(val) || this.noValueIndicator;

This problem is present in FF2, but not IE6. I'm guessing IE6 must be treating whitespace as false in the or condition.

Change History (3)

comment:1 Changed 13 years ago by bill

Milestone: 1.1
Owner: set to bill

comment:2 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [11786]) Fixes #5249: InlineEditBox?, entering whitespace should show 'noValueIndicator' to allow user to edit again

comment:3 Changed 12 years ago by bill

(In [11789]) No need to include dojo.string. Refs #5249.

Note: See TracTickets for help on using tickets.