Betancourth: Greengriminal, why wouldn’t it?
Lacassagne: Falafel_, why wouldn’t it what?
Nieder: Falafel_: yea maybe its not my javascropt but something to do wtih my rails app.
Caverly: Greengriminal, why wouldn’t it be fired on the second click?
Coven: Rubie, it seems like you could test this in isolation
Flor: Ok guys what client-side only MVC framework should I use?
Goodmanson: Im lost yes, so why don’t you hep me?
Jons: Falafel_, i’m saying that the addEventListener is only triggered if i click twice.
Werger: Example in that snippet the #execCommand is only triggered after I’ve clicked the button twice.
Thorsted: Greengriminal, could you post a demo to reproduce the issue?
Decrosta: Also, are you compiling from Coffeescript?
Bonwell: Falafel_, indeed i am compiling from CS.
Fridal: Not sure what the issue is tbh, have you tried using jQuery events instead of addEventListener?
Ring: Perhaps it behaves differently, dunno. But worth a try, it may lead you to a solution
Zalesky: Falafel_, here is the js2coffee link: http://goo.gl/csLH5g.
Abboud: And yeah i should consider using jQuery.
Eberspacher: But that’s *if* i have access to it.
Zalusky: That looks fine to me, but I would try to reproduce in isolation
Plough: Yeah i’ll mock something up.
Furse: If it works in jsfiddle, and not in your code, then something else is going on
Dario: Btw, not sure why you do button = undefined
Gemma: Can you set do***ent.body.style.backgroundColor from an external js file?
Karren: I’m including it like this in my body script src=”setbg.js”/script the code works just fine within script/script but when i try to include it from another file it doesnt work
Ellingson: Logan0405, it should work
Gulke: Any errors in the console?
Wiltberger: You sure the file is reached? Has the right permissions?
Hinger: In the right folder, etc.
Kneeland: Check under “Sources” in devtools
Maclauchlan: Yeah its in the same folder
Leuga: No its not an image actually
Zangger: I cant even get it to set a background color
Arney: Is the file appearing under “Sources”?
Hawke: Check the permissions of the file
Alba: Here is one fiddle that is not working for me, but should according to stackoverflow.https://jsfiddle.net/nick_craver/gWD66/
Junghans: Yeah linux Harnly, but im tiling an image over a background color. both work just fine inside index.html. tried to put the js code in external script is when it failed
Tossie: Logan0405, ok, I get that, I mean you should check the permissions of the file, and make sure it is readable and has the right user
Chiarello: Rubie, I get error in that fiddle in console
Kulis: Rw permissions for me
Avirett: Logan0405, then dunno, something else must be the issue. Including an external file VS putting into a script tag, it doesn’t matter, everything should work the same
Schmautz: If i take it out of the function it works fine
Arties: Err wait no it doesnt
Borycz: I wasnt sure of the implementation i wanted at first so i put it in a function
Cywinski: But i found the problem
Sadberry: Ah, well you gotta execute the function
Kipling: I’m choosing a color by time of day
Lupo: And dividing and whatnot
Holz: And by chance for the 20 mins i had it working i guess the decimals werent too long
Bzhyan: But after a while it seems the decimals that ran through it were too long for do***ent body style
Vitellaro: Mmm, not sure what that means, but glad you got it working ¯_ツ_/¯