[Feature request] Implement "beforeinput" event

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
SemiKebab
Moonbather
Moonbather
Posts: 50
Joined: 2021-05-30, 03:48

[Feature request] Implement "beforeinput" event

Unread post by SemiKebab » 2024-02-04, 02:52

Please consider implementing the beforeinput event (which is close to the keypress event).

Because of this missing implementation, currently I have to write the following in order to work on Pale Moon:

Code: Select all

const eventType = ('onbeforeinput' in inputElm) ? 'beforeinput' : 'keypress';
inputElm.addEventListener(eventType, function (e) {
    // ...
});
References: See also this issue on W3C UI Events: Event order between "keypress" and "beforeinput".