The bug
When their block state changes, waterlogged blocks don't remove the water they let through, even though that water logically should not be there anymore. The water then only disappears after another block update.
To reproduce
Build
(notice that the trap door itself is waterlogged, and is attached to the right side of the left block, not to the left side of the middle block)
Right-click onto the trap door
Wait a moment
Right-click onto the trap door again
Wait a moment
The water does not disappear
Use the button
The water disappears
It is also possible to reproduce this bug using stairs, see
[media]
Confirmed for 1.13-pre2.