danhper / atomic-chrome

Edit Chrome textareas in Atom
https://goo.gl/Et0hwg
MIT License
917 stars 30 forks source link

Placeholder email editor is not hidden by default #7

Closed joseluisq closed 8 years ago

joseluisq commented 8 years ago

Tested in Google Inbox.

image

danhper commented 8 years ago

I am going to check this out, thanks for reporting.

danhper commented 8 years ago

It seems that inbox does not use a real placeholder but rather a label which it hides/shows. I think manually triggering some event on the div should probably do the job but I did not find which one yet.

Maybe someone familiar with the GWT framework would know what to do here?

joseluisq commented 8 years ago

It seems that inbox does not use a real placeholder but rather a label which it hides/shows.

Yes, this uses a label like placeholder.

joseluisq commented 8 years ago

I think manually triggering some event on the div should probably do the job but I did not find which one yet.

If you try to resize the window the placeholder disappears. I think that you could trigger resize event for label that placeholder can be hidden.

danhper commented 8 years ago

If you try to resize the window the placeholder disappears. I think that you could trigger resize event for label that placeholder can be hidden.

Thank for the tip about resizing, I could reproduce it by firing the event programatically. I am going to see how I can integrate these kind of cases cleanly.

danhper commented 8 years ago

@joseluisq Thank you very much for reporting and for the resize trick. This should be fixed in 0.1.1, please give it a try! The only case which will not work is:

  1. Start Atomic Chrome
  2. Write there (the placeholder should disappear)
  3. Erase the content directly from the browser (the placeholder should reappear)
  4. Restart typing in atom (the placeholder will not disappear)

as the window resize event is only triggered on the first change. I do not think this should be a problem, so I think I will leave this as it is to avoid triggering events for no good reason.

joseluisq commented 8 years ago

Cool :+1: