Scene2d:InputListener 不调用 touchUp

Scene2d: InputListener does not call touchUp

我试过在 Actor 上使用 InputListener,但似乎没有调用 touchUp。其他所有方法都对我有用。

stage = new Stage(new ScreenViewport());

Widget actor = new Widget();
actor.setFillParent(true);
actor.addListener(new InputListener() {
    public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
        Gdx.app.log("", "");
    }
});
stage.addActor(actor);
Gdx.input.setInputProcessor(stage);
    stage = new Stage(new ScreenViewport());

    Widget actor = new Widget();
    actor.setFillParent(true);
    actor.addListener(new InputListener() {

        @Override
        public void touchDown(InputEvent event, float x, float y, int pointer, int button) {
            return true;
        }

        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            Gdx.app.log("", "");
        }
    });
    stage.addActor(actor);


    Gdx.input.setInputProcessor(stage);