Opened 13 years ago
Last modified 13 years ago
#8325 confirmed Bug
Error Message not displayed when we enter invalid CSS in Styles field
Reported by: | Satya Minnekanti | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IBM | Cc: | Damian, Teresa Monahan |
Description
On all dialogs that provide an advanced tab, the user can specify CSS styling through the Styles field. However this field is not validated when user enters inValid CSS & clicks OK. Therefore they can enter fake values and it looks to the user that they are accepted.
To reproduce:
- Open the Table dialog.
- On the advanced tab, if the user enters a name value pair that is not valid css (e.g. myFakeAttribute: 200px)
- Click OK.
Expected Result: An error warning should occur indicating that the user has entered inCalid css
Problem: There is no error warning that the value entered is inValid CSS. However when the dialog is opened again, Styles field is now empty. The user has not been told that their content is invalid so they have no idea why their content has been removed. This would also occur if the user accidentally mis-spelled a CSS attribute name e.g. widtth: 100px. This is not reported as invalid, but it is removed from the Styles field on the dialog.
Is there anyway to use the same validation that removes these entries from the Styles field, to also alert the user to invalid content when they click OK on the dialog? Do you know at what point the invalid entries get removed from the Styles field? Is this something CKEditor has control over or is it due to the browser?
This issue originally reported in ticket #8124 which is fixed in 3.6.2 but the issues mentioned in ticket #8124 still exists so we are logging this new ticket to track the issue
Change History (2)
comment:1 Changed 13 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 13 years ago by
In #8124 I asked what kind of validation you wanted, but there was no reply and so a basic check was added.
You haven't stated which browser you are testing, but I guess that it must be IE or older versions of other browsers; if you check this test you can see that the browser might not return the style contents that were set http://www.martinezdelizarrondo.com/bugs/style.html even if they are valid. Dealing with new properties or vendor-specific extensions just makes things more complex (and people might want to use _width and the like to create a hack for older browsers)
IMO this can be confusing for the user, so alerts (perhaps alerts allowing to repair invalid content) seem like a good idea here