Film/Batman example: The length of the gun isn't actually a problem - the scene and his motions pulling it out make it pretty clear the gun has a telescoping barrel and was "clipped" at the far end so that it would fully extend before pulling free. The problem is you can't make a telescoping bullet-firing gun that long. (Air rifles and water guns, yes, but nothing which could bring down an aircraft.) Good sight gag, though, and conceivably used that way even in-universe, with somebody else firing the real shot on cue. The Joker might have that sort of arrangement set up.
Film/Batman example: The length of the gun isn't actually a problem - the scene and his motions pulling it out make it pretty clear the gun has a telescoping barrel and was "clipped" at the far end so that it would fully extend before pulling free. The problem is you can't make a telescoping bullet-firing gun that long. (Air rifles and water guns, yes, but nothing which could bring down an aircraft.) Good sight gag, though, and conceivably used that way even in-universe, with somebody else firing the real shot on cue. The Joker might have that sort of arrangement set up.