Battery draining while charging isn't all that unusual, depending on the device it can happen relatively easily. Some phones have that problem regularly, notably with crap chargers.
The pain of being on a committee designing a battery status API, it teaches you things.