Opened 11 years ago
Closed 11 years ago
#11910 closed Bug (fixed)
Image2 does not honor config.baseHref when trying to get image width/height
Reported by: | Wiktor Walc | Owned by: | Olek Nowodziński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.2 |
Component: | General | Version: | 4.3 |
Keywords: | Cc: |
Description
Reported in http://ckeditor.com/comment/131832#comment-131832 by Frank Müller:
In the WYSIWIG view I can see the image, so this shows me that the editor properly combines my "config.baseHref" with "images/large/10061_713.jpg" and calls the server to get the image.
What I found out from reading the code is, that image2 popup loads the image from the server to determine width & height of the image. What I observed is that the "image2" plugin seems not to use "baseHref" to load the image from server. I was expecting that image2 combines ""baseHref" with the relative URL (the one I typed into the "URL" input field).
wwalc: I was able to confirm this, at least in Firefox and Chrome.
Steps to reproduce, assuming that the image is located in /path/to/images/file.jpg
:
- Set
config.baseHref
to/path/to/
- In image dialog type URL:
images/file.jpg
- Press tab key so that the width/height value was calculated
- Result in image dialog: width/height are calculated properly.
- Result in image2 dialog: width/height are not set at all.
Attachments (1)
Change History (14)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Milestone: | → CKEditor 4.4.2 |
---|
comment:3 Changed 11 years ago by
Owner: | set to Olek Nowodziński |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
Status: | assigned → review |
---|
comment:7 follow-up: 8 Changed 11 years ago by
Status: | review → review_failed |
---|
There is something wrong on IE8:
- there are no
baseHref
in the image URL, images are not displayed; this does not work with both image and image2, - in the sample if you follow described steps but press "tab" key twice image height change incorrectly.
Both may be considered as a separate tickets but with these bugs solution seems not to work on IE8. We need to decide if we fix it now or create a separate tickets.
comment:8 Changed 11 years ago by
Status: | review_failed → review |
---|
Rebased branch on latest master.
Replying to pjasiun:
There is something wrong on IE8:
- there are no
baseHref
in the image URL, images are not displayed; this does not work with both image and image2,
That's funny and it took me a while to figure it out. Apparently <base href="...">
never worked properly in IEs but no one noticed it. I fixed it in this commit https://github.com/cksource/ckeditor-dev/commit/ea47726ea4186. See code comments to know more.
- in the sample if you follow described steps but press "tab" key twice image height change incorrectly.
Tried in Chrome, FF and IE8 and 9. I was able to reproduce it in IE8 only though. Since it's not related to the ticket, I'm for extracting it somewhere else.
I also pushed a commit https://github.com/cksource/ckeditor-dev/commit/0e2707721eacc5d8d3505dae08aec7811b09efae, which fixes default behaviour when config.baseHref
is not set. It looks like neither of you checked if branch breaks default behaviour of the plugin :P
comment:9 follow-up: 10 Changed 11 years ago by
Status: | review → review_failed |
---|
"Reset size" button in the Image2 plugin dialog does not work on IE8 if I use baseHref
. It works if I do not use baseHref
.
comment:10 Changed 11 years ago by
Status: | review_failed → review |
---|
Replying to pjasiun:
"Reset size" button in the Image2 plugin dialog does not work on IE8 if I use
baseHref
. It works if I do not usebaseHref
.
It's a known bug, which concerns getNatural
method in Image2 plugin (there's code branching in there). Since the it's quite unlikely to use such combination (IE8, Image2, config.baseHref), it's a low priority issue.
comment:11 Changed 11 years ago by
Please stop bouncing this. Extract unrelated or low-prior issues and close it.
comment:12 Changed 11 years ago by
Status: | review → review_passed |
---|
Ok, beside this everything works fine.
comment:13 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
git:8eb72d1 landed in master.
Pushed fix to branch:t/11910 (dev).