Transparent objects block objects behind them when not selected In renders this the transparency works ok. But in viewport in materials view something is very broken. When I selected the transparent object the object behind it shows up ok. When I select nothing the transparent object becomes solid and blocks the other one. When I select the object behind the transparent object it stays blocked behind the transparent object.

Blend file added. When you open the file just click the different objects and see how the transparency turns on and off depending what is selected on both separate transparent objects. Render is fine but I can't work in render view. 

blend: https://www108.zippyshare.com/v/gWH4KN9d/file.html
In the properties of the "glass" shader, under Settings / Viewport color, lower the Alpha value.

In the properties of every transparent object, in Object / Display, check Transparency.

Bonus : this kind of transparency also works in Solid view, not only in Material view.