Print Preview Custom Margins: Fix undo
Allow undo (via ctrl + Z or context menu) to work for the Print Preview custom margins input boxes by: (1) Moving the units outside of the text input area (aligned with the end of the text) rather than appending them to the text directly (2) Checking if the parsed value in pts matches before overriding the input value. Note that (1) requires making these inputs normal <input>s rather than <cr-input>s, and using the cr input styling via cr-input-style. Also fixing validation regexes, to handle the following cases: (1) Entries using the thousands delimeter (e.g. '1,000') - currently everything after the thousands delimeter is ignored. (2) Entries with numbers only after the decimal (e.g. '.5') - currently shows an invalid syntax error (users have to enter e.g. '0.5'). Bug: 452844 Change-Id: I933e56358b75785cf8b42f10585df4522cefe734 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672526 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#671959}
Showing
Please register or sign in to comment