I only tried your code on Chrome, but the onclick in the HTML is executed before the code from widgets.js, so there is not much we can do.
Adding if (event.stopPropagation) {event.stopPropagation();} in the onclick before the return false; works though.