diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2017-03-24 11:04:21 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2017-03-24 14:07:07 +0100 |
| commit | 8d948d92350c858e3f5534020968bbfda4c8d154 (patch) | |
| tree | e1036507561cc239ba71357dfe3d175f4889a36f /addons/web/static/src | |
| parent | a82fb281d12c09035d81e3391fc99c91439a9384 (diff) | |
[FIX] barcodes: fix FieldFloatScannable on firefox
On firefox pressing special keys such as: Left Arrow or Backspace
trigger a keypress event.
This is different from google chrome which only generate a keydown and
keyup event.
There was thus two issue when using a FieldFloatScannable and firefox:
1. Keys such as ArrowLeft: would still be catched by FieldFloatScannable
and be added programatically to the field but since Odoo didn't fix
them a ASCII NUL character (0x0) would be added (in firefox it is
represented by a large space).
2. Keys such as Backspace: would still be catched by FieldFloatScannable
but were modified and corrected by Odoo so the corresponding ASCII
character was added (ASCII BS character (0x8) for backspace).
The feature in FieldFloatScannable which add the character is used to
add characters for which the browser had been prevented to display them.
Thus this fix:
- for issue 1 and 2: only use the feature of FieldFloatScannable if the
event was previously prevented and the current one is a forgery.
- for issue 2: add "Backspace" and "Delete" as specials characters which
should not be modified or stopped by the scanner heuristic.
opw-706352
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions
