mduvall / grande.js

It's a Medium at Starbucks. Pinky ring out.
MIT License
1.3k stars 80 forks source link

Added event param to getHorizontalBounds #73

Closed toemat closed 10 years ago

toemat commented 10 years ago

Firefox (v30) errors on getHorizontalBounds() because event is out of scope. This occurs when allowImages is enabled, and causes the Insert Image tool tip to not work.

Request to add event to the parameters of getHorizontalBounds()!

Btw, can someone explain why in chrome event is not undefined at coordY = event.pageY - root.scrollY; (line 206 in getHorizontalBounds())? Is it just being generous with the scope, or is it supposed to work like that?

mduvall commented 10 years ago

Great catch, pretty lame it looks like a browser inconsistency in an exported global (and FF happens to be the on that doesn't do it). Here's an SO question describing the issue.

Thanks for this, going in!

toemat commented 10 years ago

Cool! Thanks for the link, it's all making sense now!