@Gama11 So I did some tests, and it turned out that the wrong mapping problem only occurred with Firefox, but only with an older version I was using, Firefox 48.0.2, on OSX Mountain Lion (an old OSX version now unsupported by Apple and most browsers). In the Haxeflixel demo, model would show up as UNKNOWN, and name as just "Controller", and the mapping problem persisted even if I changed the model manually to XINPUT. Also, on this same version of Firefox, sometimes the gamepad would only get detected if I touched a button or moved the sticks first (weird, I know).
With Google Chrome, both older Mountain Lion version and latest version on latest OSX, gamepad works fine. Shows up correctly as XINPUT, Xbox 360 Controller.
With Safari, even latest version on latest OSX, gamepad is NOT detected at all.
Same for the latest version of Firefox on latest OSX, gamepad not detected at all.
I'm not sure why Safari and latest Firefox don't detect the gamepad, but I think I'm fine with this, as long as it doesn't behave incorrectly. Again the wrong mapping thing only happens on an old obsolete version of Firefox, so it doesn't matter to me.
It's weird though that Flash behaviour changes from browser to browser. Only thing I can think of is that Chrome uses its own built-in Flash plugin, whereas Firefox and Safari use the one installed with the Adobe Installer. But they are both the same latest version, 220.127.116.11.