Resize event only triggers once

I’m debugging the following app (trying it in browser):

import feathers.controls.Application;
import feathers.controls.Label;

class PhantasyStar3 extends Application {
	private var label:Label;
	private var i:Int = 0;

	public function new() {
		super();

		label = new Label();
		label.text = cast(stage.width);
		addChild(label);
		stage.addEventListener("resize", stage_resizeHandler);
	}

	public function stage_resizeHandler(e) {
		trace(i);
		i += 1;
		label.text = cast(stage.width);
	}
}

The stage_resizeHandler() only runs once. Even if it’s a bug, I’d like to know if anyone relies on this or just use StageScaleMode.SHOW_ALL for landscape games that may run on mobile phones, consequently scaling the user interface together with the gameplay world?

I recommend switching to stage.stageWidth instead of stage.width. In most cases, stage.width will probably return a value that is different from what you expect. stage.width is the size of the stage’s content, which can change as you add, remove, or resize children of the stage. stage.stageWidth is the full rectangle where the stage is rendered and it is not affected by the children of the stage. It is only affected by the resizing of the window that contains the stage.

I have a whole game engine relying upon it, and it works. You should set stage.scaleMode = StageScaleMode.NO_SCALE if you want to make it work.