Copy panel.js from sdk v1.14
Backport bug 852023 on sdk/panel.js and use it, fixes #13