mduvall/grande.js — pull request #51 by deniaz (2013-11-08 14:52:07+00:00)
Title: Disable menu when non-editable text is selected

When making only part of a site editable the menu should only open on editable parts. The changes in this PR check whether the Source Element is editable - if not, it returns false instead of continuing.

**How to replicate**

1. Create a example page with an ```

``` and an ```

``` element - both with text content
2. Bind grande.js with ```g.bind(document.querySelectorAll('article');```
3. Select text *outside* of ```

``` but *within* ```

```

![screenshot-grandejs-bug](https://f.cloud.github.com/assets/698963/1501009/f805917e-4883-11e3-8124-459a20e747ea.png)

When clicking a option on a non-editable node, An *Uncaught TypeError: Cannot read property 'parentNode' of null* gets thrown.

Thanks for making grande.js - it's really awesome to use.