Fix of issue #12067

The deleted line forces second onShow event. Fix of issue #12067