Closed Bug 99306 Opened 24 years ago Closed 24 years ago

Table properties row and columns set to null is not handled correctly

Categories

(SeaMonkey :: Composer, defect)

x86
Other
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: slogan, Assigned: cmanske)

References

()

Details

(Whiteboard: EDITORBASE)

Attachments

(1 file)

This is a new bug opened based on comments made in 73049. In the 9-06 Build: 1. create a table with 2 rows, 2 columns 2. right click on the table and select properties 3. change the row and columns number to 0 RESULT: Receive error: "The number you entered (0) is outside the allowed range. Please enter a number between 1-1000." 1. create a table with 2 rows, 2 columns 2. right click on the table and select properties 3. change the row and columns number to null RESULT: I get a message informing me that: "Reducing the number of rows or columns will delete table cells and their contents. Do you really want to do this?" If I click "Delete Cells" on this the table, and it's contents are deleted. Is this the correct behavior, should I see the first error message in both instances, or as Sujay pointed out - should the OK button be greyed out (like it is when you atempt to create a table with no value for rows or columns)?
spam composer change
Component: Editor: Core → Editor: Composer
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
Whiteboard: EDITORBASE (1/2 day)
Attached patch Fix.Splinter Review
Here's what the fix does: The params changed from "null" to "true" in EdTableProps.js is the "mustHaveValue" param for the "ValidateNumber()" method. That method (in EdDialogCommon.js) needed to be fixed so if "mustHaveValue" is true, the error-reporting block that follows is executed even if the "nunumString" string is empty. The result is that the error dialog will now say: "Please enter a number between 1 and 1000" when the row or columns string is empty. That seems like a reasonable error message.
Keywords: patch, review
Whiteboard: EDITORBASE (1/2 day) → EDITORBASE (1/2 day), FIX IN HAND, need r=,sr=
"nunumString" in last comment should be ""numString", the string from the input field.
Charley, when testing this I'm getting all kinds of asserts from the table dialogs. Probably not related to this bug, but should I file another one? On whom? Error reading file jar:resource:///chrome/classic.jar!/skin/classic/global/arrow/arrow-lft.gif Error reading file jar:resource:///chrome/classic.jar!/skin/classic/global/arrow/arrow-rit.gif XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,795,6481,4951) does not intersect the widget's view (0,0,0,0)! ###!!! ASSERTION: trouble: no buffer!: 'buffer', file nsASingleFragmentString.cpp, line 36 ###!!! Break: at file nsASingleFragmentString.cpp, line 36 ###!!! ASSERTION: trouble: no buffer!: 'buffer', file nsASingleFragmentString.cpp, line 36 ###!!! Break: at file nsASingleFragmentString.cpp, line 36 XXX Damage rectangle (0,0,7516,4726) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,4725,6481,1021) does not intersect the widget's view (0,0,0,0)! XXX Damage rectangle (210,4725,7501,541) does not intersect the widget's view (0,0,7500,4711)! The error message seems reasonable. r=akkana on the patch, but please let me know what to do about the asserts and warnings.
Comment on attachment 55843 [details] [diff] [review] Fix. r=akkana
Attachment #55843 - Flags: review+
sr=sfraser
Keywords: patch, review
Whiteboard: EDITORBASE (1/2 day), FIX IN HAND, need r=,sr= → EDITORBASE (1/2 day), FIX IN HAND, reviewed
Attachment #55843 - Flags: superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: EDITORBASE (1/2 day), FIX IN HAND, reviewed → EDITORBASE
Verified 11-01 trunk.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: