Inputmask: jQuery Inputmask 5.0.6-beta.15 does not work with wkhtmltopdf (QtWeb Browser)

Created on 18 Nov 2020  路  3Comments  路  Source: RobinHerbots/Inputmask

This Plugin does not work with the QtWeb Browser (http://www.qtweb.net/) which is used by the HTML-to-PDF conversion Software wkhtmltopdf (https://wkhtmltopdf.org/).

Here is a basic test using a 'numeric'-type Inputmask:

<input type="text" data-inputmask="'alias' : 'float'" value="1000000,56">

<script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.6-beta.15/jquery.inputmask.js"></script>
<script>
var aliases = {
    float: {
        alias: 'numeric',
        groupSeparator: '.',
        rightAlign: false,
        removeMaskOnSubmit: true,
        autoUnmask: true,
        radixPoint: ',',
        digits: 2,
        digitsOptional: true,
    }
};

Inputmask.extendAliases(aliases);

$('[data-inputmask]').inputmask();
</script>
  • Describe the bug:
    QtWebInputmask

The mask seems to be applied correctly in all browsers (IE included) except for QtWeb.

  • OS: Windows 10
  • Browser: Chrome / QtWeb
  • Inputmask version: Inputmask 5.0.6-beta.15
Compatibility Question

All 3 comments

@subarachnid ,

wkhtmltopdf uses a very old version of webkit (qtweb) which probaly does not support the features used.
This should be solable by using polyfills.

I will need to install the qtweb browser to see what is missing.

@RobinHerbots I think you are right, but the strange thing is that QtWeb does not show any JavaScript errors in its developer console. The one thing that I know of is that Function.prototype.bind is not available in QtWeb, but even when I add a polyfill for that the problem still occurs. Thank you very much for your efforts!

Same problem here! Is there any workaround? does downgrading inputmask version work?

Update: Tested version 5.0.0 and it works

Was this page helpful?
0 / 5 - 0 ratings