grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

[Bug]: Unit select field missing on IE after click

Open lorrandavid opened this issue 8 years ago • 12 comments

@artf I'm currently using GrapesJS latest version (but you can reproduce this bug using the demo). Basically all you have to do is select any element, go to a property that has a unit select field and select a value, it will turn blank until you select another value again. It just happens on IE.

EDIT: Changing unit works but the problem is I can't see the value on the select field, it stays blank until I select it again.

lorrandavid avatar Jul 18 '18 14:07 lorrandavid

Which IE?

artf avatar Jul 19 '18 21:07 artf

It seems like it happens on IE 10 and 11. I'm not exactly sure about the build version but I'll look into it when I get home and edit this.

EDIT: Currently my IE 11 is on build 11.0.9600.17843IS but I've also tried it on Windows 10 latest update and the result was the same. If you can't replicate the issue I can record a gif for you.

lorrandavid avatar Jul 20 '18 08:07 lorrandavid

Any news on this matter @artf? I can try to help you if you need

lorrandavid avatar Jul 23 '18 14:07 lorrandavid

I'd really appreciate a help, it might be just a CSS "issue"

artf avatar Jul 25 '18 20:07 artf

I have been checking it in IE11 but I do not see any CSS problem in the selectors.

Anyway, I found another problem when trying to toggle any of the groups (sectors) from the style manager:

this.getPropertiesEl().style.display="none", Unable to get property 'style' of undefined or null reference

I think supporting IE would be a bad idea.

Example: I have my own grapesjs code full of this: https://stackoverflow.com/questions/44437497/syntax-error-using-in-ie

I am sure that if I rewrite all that functions, new problems will appear.

jmrgz avatar Aug 02 '18 19:08 jmrgz

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

no-response[bot] avatar Aug 04 '18 21:08 no-response[bot]

@xamdam777 my solution is to add a check before that line: if (this.getPropertiesEl() === null || this.getPropertiesEl() === undefined) { return; } actually i did have to add some of the check nulls like this to have it work on IE

theanhmx avatar Aug 15 '18 10:08 theanhmx

@artf, I been trying to fix this issue also. I figured that if I just add something to the select element around the units, the HTML got rerendered and the select working again. But that will erase all the event listener and it won't update the style. could you give any advice on this?

theanhmx avatar Aug 17 '18 07:08 theanhmx

I figured that if I just add something to the select element around the units

@theanhmx What do you mean? Adding what and how?

artf avatar Aug 19 '18 11:08 artf

just use the inspector edit the select tag as html string, add any text or string to it. then it will work on IE. but when the select change its selected value, the style seem.to be not updated. i doubt that all th event listener got erased when we change html.like that.

theanhmx avatar Aug 19 '18 11:08 theanhmx

well, in that case, it's a normal behavior because it's like doing el.innerHTML = "<select>..." which creates new nodes... it also explains that IE fails for no real reason -.-

artf avatar Aug 19 '18 12:08 artf

yah, but as @lorrant discribed "Basically all you have to do is select any element, go to a property that has a unit select field and select a value, it will turn blank until you select another value again. It just happens on IE.". you have any idea to workaround this issue? i dont know if it is possible or not but i was trying to copy all the event listener from the current select element to the new one after i had edited the html.

theanhmx avatar Aug 19 '18 12:08 theanhmx