fix #315 AutoComplete JS error when clicking the dropdown button

Fixing a regression after b1eb1323439bc3f3203ef5b0c3880410105e8715 using
the similar solution as in 1c8d106816f790fa65465660ee9a6b9ab375af50.

The problem could happen when the focus triggered a section refresh,
then this._cfg in the widget would be null.

Pull request #316.