Nit: please add braces to your if() statement
```javascript
          if (input.refresh) {
            input.refresh(); // XXX to be removed when bug344618 lands
          }
```