altmp / altv-issues

Issues and roadmap for alt:V project
92 stars 17 forks source link

Native displayOnscreenKeyboard stopped working with latest altv versions #1879

Open Quantum2707 opened 1 year ago

Quantum2707 commented 1 year ago

Description of the problem

When using displayOnscreenKeyboard there used to appear a textbox, now executing this command does not affect anything. Also other developers reported this in Discord.

Reproduction steps

Use my following method, which worked before latest altv updates and see that it does not work as expected anymore.

TypeScript:

async function GetPlayerInput(title: string, maxCharacters: number): Promise<string | false> {
    return await new Promise(resolve => {
        alt.addGxtText('INPUT_BOX_CUSTOM_TITLE', title);
        natives.displayOnscreenKeyboard(1, 'INPUT_BOX_CUSTOM_TITLE', '', '', '', '', '', maxCharacters);
        let timer = alt.setInterval(() => {
            alt.logError(natives.updateOnscreenKeyboard());
            if (natives.updateOnscreenKeyboard() == 1 || natives.updateOnscreenKeyboard() == 2) {
                alt.clearInterval(timer);
                if (natives.getOnscreenKeyboardResult()) {
                    if (natives.getOnscreenKeyboardResult().length > 0) {
                        resolve(natives.getOnscreenKeyboardResult());
                        return;
                    }
                }
                resolve(false);
            }
        }, 10);
    });
}

Expected behaviour

A textbox to appear as before

Additional context

No response

Operating system

Windows 10

Version

14.43

Reproduction tested

alphasylvain commented 1 year ago

;) i confirm :p

xxshady commented 11 months ago

Confirmed on 15.0-dev360

xxshady commented 3 months ago

@Quantum2707 is it fixed?

Quantum2707 commented 3 months ago

@xxshady closed because all other tickets related to this which stated the exact same were closed way before and because of inactivity on this ticket.

xLuxy commented 3 months ago

How do you expect devs to fix this when it gets closed? Has this already been fixed? Re-opened it for now to keep track of issues.

Quantum2707 commented 3 months ago

How do you expect devs to fix this when it gets closed? Re-opened.

@xLuxy As mentioned before, about 3-4 duplicates stating the exact same were confirmed fixed so there is no way this isnt able to be closed too. Unless people didnt test well in the others.

Cheers

xxshady commented 3 months ago

Reproduced this issue on 16.0.0-dev.299