Here is how I get the issue:
In a new layer, I draw something and adjust the color using Brightness, Invert Colors, Delete or something else (the selection contains what I want to adjust and it also contains some full-transparent pixels which I thought it not matter to select them too). I have many layers like that. When merging these layers, I get a layer with some full-transparent but different-RGB pixels. Now I want to select all visible pixels in the merged layer (because I want to cut off the part of the canvas which doesn't contains anything). It seems like the best way is to select all of the full-transparent pixels and then Invert Selection, but it's not easy to do that.