Quadrature encoder has one synced edge and one phase-shifted edge, is this a special encoding scheme?
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. One way of generating the incorrect output.

With incorrect wiring 'A' can only pull low when the 'B' contact is closed.

Are you sure you have wired the encoder correctly. Note that the example from Electro Schematics shows that the centre pin is common.