Closed
Bug 90229
Opened 24 years ago
Closed 23 years ago
Don't disable "OK" button in Image dialog when image doesn't have proper extension.
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.7
People
(Reporter: cmanske, Assigned: cmanske)
References
Details
(Whiteboard: EDITORBASE)
Attachments
(1 file, 3 obsolete files)
8.41 KB,
patch
|
Brade
:
review+
hewitt
:
superreview+
|
Details | Diff | Splinter Review |
User testing has discovered that users can be confused by our disabling of
OK button without explanation if file extension is not ".gif", ".jpg", ".jpeg",
or ".png". This is especially important when user has saved an image to a file
but did not supply an extension.
We may want to leverage the fact that in the image dialog, we always try to
load the user-entered URL, so we do know if the image loads correctly.
If it does not, them maybe we can put up a warning message that maybe this is
not a valid image instead of our current button disabling strategy.
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 1•24 years ago
|
||
Do we want to enable it when there is no extension? What if user has file with
.txt extension or .bmp (which we don't support right now)? We have lots of
little things to test here... :-/
Updated•24 years ago
|
OS: Windows NT → All
Hardware: PC → All
Assignee | ||
Comment 3•24 years ago
|
||
I'm not sure what is worse, not letting them select a file that is a valid image,
but maybe has a bad filename, or letting them use a non-image filename. For
latter, the worst that happens is they get a broken image in the page.
We should definitely not consider the image invalid if we know that it loaded
correctly in the preview window, even if the extension is bad.
Target Milestone: mozilla1.0 → mozilla0.9.5
Comment 4•24 years ago
|
||
To be clear, there is nothing wrong with naming my image file: myFamilyPicture
The problem isn't really at the user side (although we may want to think it is).
If we really wanted to help users avoid bad urls, we'd provide an image link
checker or a button in this dialog to help them confirm they have the correct
url entered (but that'd be another bug...).
My current leaning on this bug is to remove the check for extensions.
Sujay and/or Shrir--if we do this, you'll need to verify that we don't mishandle
various filetypes (*.txt, *.doc, *.bmp, *.html, etc.)
As I said in a comment in bug 90572 , it is mainly a problem when accessing say
a servlet where there is no extension. I like the idea of the button to check if
the image is a valid image. Or there can be a check on the extension that would
display something like "valid image" next to the "check button".
Assignee | ||
Comment 6•24 years ago
|
||
We don't need a "check valid" button, we automatically try to load any image
referenced in the Image Dialog. If the preview window contains a thumbnail of
the image, then it was loaded correctly and thus is valid.
Besides simply showing a preview image, this is to do the following:
If you had an image that was "broken" (e.g., image wasn't in correct
location when <img> tag made), but you now fixed it, or you edited the image
in an image editor, then launching the image dialog for that image will force
reloading it (and we ignore the image cache.)
This seems a good solution to me. Just to have an idea, when do you think it can
be fix ? (I don't want to push things, just to know). Could you tell me when it
gets in the nightly builds ?
Thanks
Assignee | ||
Updated•23 years ago
|
Summary: Don't disabling "OK" button in Image dialog when image doesn't have proper extension. → Don't disable "OK" button in Image dialog when image doesn't have proper extension.
Whiteboard: EDITORBASE (1/2 day)
Assignee | ||
Comment 12•23 years ago
|
||
The change to EdImageProps.js is needed because now that we accept anything for
an image URL, we don't want to try to load the preview image for every
keystroke,
so do that only after a 0.8sec idle delay when user types. (ChangeImageSrc() is
the oninput event handler for the image SRC textbox.)
Assignee | ||
Comment 13•23 years ago
|
||
This is the simplest fix for the bug. We could rip out all calls to
"IsValidImage()", but we might come up another strategy in the future.
I decided not to rely on the preview image loading to "validate" since that
wouldn't work when image is not available like when user is offline.
Assignee | ||
Comment 14•23 years ago
|
||
Comment 15•23 years ago
|
||
Are you introducing any JS warnings? In the 2nd patch, it doesn't look like
canEnableOk is declared (for example).
Sujay--when testing this fix, be sure to verify the image map button(s) and the
advanced edit button (in addition to the OK button).
Assignee | ||
Comment 16•23 years ago
|
||
Comment on attachment 59419 [details] [diff] [review]
The "aggessive" fix: Completely remove "IsValidImage()" and all code that used it.
r=syd
Attachment #59419 -
Flags: review+
Comment 17•23 years ago
|
||
I thought there was going to be a new patch to address the warning issue I
mentioned above... I don't understand where doOverallEnabling() initializes
canEnableOk.
Updated•23 years ago
|
Attachment #59419 -
Flags: review+
Comment 18•23 years ago
|
||
Comment on attachment 59419 [details] [diff] [review]
The "aggessive" fix: Completely remove "IsValidImage()" and all code that used it.
removing has-review flag since reviewers still have unanswered questions
Assignee | ||
Comment 19•23 years ago
|
||
Sorry! Forgot to attach updated fix.
Attachment #59404 -
Attachment is obsolete: true
Attachment #59419 -
Attachment is obsolete: true
Comment 20•23 years ago
|
||
r=brade if you fix up the spacing issues I mentioned on irc and remove the "if"
we discussed on irc
Whiteboard: EDITORBASE (1/2 day) FIX IN HAND, need r=,sr= → EDITORBASE (1/2 day) FIX IN HAND, need sr=
Assignee | ||
Comment 21•23 years ago
|
||
Attachment #59717 -
Attachment is obsolete: true
Comment 22•23 years ago
|
||
Comment on attachment 59735 [details] [diff] [review]
Updated patch with brade's suggestions
r=brade
Attachment #59735 -
Flags: review+
Comment 23•23 years ago
|
||
Comment on attachment 59735 [details] [diff] [review]
Updated patch with brade's suggestions
sr=hewitt
Attachment #59735 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Whiteboard: EDITORBASE (1/2 day) FIX IN HAND, need sr= → EDITORBASE (1/2 day) FIX IN HAND
Assignee | ||
Comment 24•23 years ago
|
||
checked in
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•