• rbpotter's avatar
    Print Preview: Prevent empty grey area in plugin · 425cd7d0
    rbpotter authored
    When the user changes focus between custom margins inputs, this causes
    the preview area to scroll, which should not occur since the iframe
    containing the plugin is in a fixed location. Work around this issue
    in the same way as in the old UI: manually set the offsets of the
    preview area element to 0.
    
    This workaround has the downside that the newly focused input is not
    visible to the user, and therefore key events cause another scroll,
    which is not addressed by the workaround. To address this issue, after
    setting the offsets, inform the plugin that it should scroll to make
    the input visible.
    
    Bug: 901777
    Change-Id: If310b84229fd53ffaee449699b8ac8a13806101c
    Reviewed-on: https://chromium-review.googlesource.com/c/1351950Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
    Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#612506}
    425cd7d0
pdf_scripting_api.js 9.14 KB