Product details HTML editor doesn't work on Chrome |
Post Reply |
Author | |
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
Posted: 19-April-2017 at 6:51pm |
I'm having trouble with the product description HTML editor on the first tab of the Modify Product page.
It appears to load with the correct content, but then it seems to delete it as the page finishes loading. Then, I am unable to edit the product description unless I add a table to the html editor, at which point I am able to put my cursor into the html box. However, at this point the existing product description has already been wiped and so it will be deleted if I save the product. This seems to be specific to Chrome (Version 59.0.3067.6 (Official Build) dev (64-bit)). I haven't tested an old version of chrome, or the non-dev channel, so it could be something specific to the Chrome dev channel. I tested on Firefox and Internet Explorer and everything works as expected there. Has anyone else run into this issue? I'm trying to rule out possible causes, but I wanted to check and see if this is a known problem before I dig too deep into it. |
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
The problem seems to be somewhere around saf/editor.js line 680.
It's weird, if I put a breakpoint right here and "Step into next function call", then the content loads like it should. It isn't skipping over any function calls or anything, just pausing between line 680 and line 684. There seems to be a console warning on line 680 related to edtStr.join("). The error reads as follows:
Is this some kind of race condition, where it's bugging out because the blank.gif hasn't loaded in time? That's the only thing I can think of, since it works as long as I use Chrome's dev tools to "step into" the function calls around that line. |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
Hi Brett,
I don't know if it's related to your issue and the HTML Editor, but there is a known issue with Chrome v57 that has been reported by a few ProductCart merchants when using the ProductCart Control Panel: This sounds like it might be related, but you are already using v59 Dev, so it's possible that a new/different bug was introduced in that version, which is causing the problem. We recommend using an alternative browser until v59 is out of Beta. At that point, it will be interesting to see if the issue has been addressed.
|
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
I'll try the production version of Chrome and see if that stops the error. However, I believe I've found the cause. On lines 666 and 667 of /saf/editor.js, the initial iframes are added to the sHTML string to be inserted into the page.
These iframes are created with an initial src pointing to the path of blank.gif. Usually an iframe src will be a document, but this has it pointing to an image, which explains why it's saying it was interpreted as document but transferred as gif. When I remove the references to blank.gif on these lines and make it so the iframe's initial src is just an empty string (''), the errors stop and everything seems to load normally. Is there any reason for setting the iframe's initial src to the path of blank.gif? Is there any risk in my removing it and having it just start as an empty string? |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
Hi Brett,
Interesting - I'll forward this to our development team for an answer (i.e. the reason for initially pointing to 'blank.gif').
|
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
Perfect, thanks. I'm going to go ahead and leave it modified for now since it isn't customer-facing. I'll let you know if I run into any problems, and please do let me know as soon as you hear back from the development team in case there's some problem this may cause that I'm not noticing.
|
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
Hi Brett,
I ran this by one of our developers, and was reminded that the HTML Editor in ProductCart is actually from Innova Studio (and included in ProductCart under a general licensing agreement), so we can't say for certain what their reasoning is for setting the iFrame's initial 'src' to the blank.gif. At this point though, it seems like your modification is an acceptable workaround.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |