Commit 314fd620 authored by dpapad's avatar dpapad Committed by Commit Bot

PDF Viewer update: Select text on pointerup in zoom input.

This makes the behavior of the page input and zoom input
consistent, per UX request.

Bug: None
Change-Id: I8a44057f22971b9a77f0e7cefa91dd82c7e3e8e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2385955
Auto-Submit: dpapad <dpapad@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803230}
parent ef6adbc7
......@@ -35,8 +35,8 @@
margin: 0 var(--page-selector-spacing);
}
</style>
<input type="text" id="pageselector" value="[[pageNo]]" on-mouseup="select"
on-input="onInput_" on-change="pageNoCommitted"
<input type="text" id="pageselector" value="[[pageNo]]"
on-pointerup="select" on-input="onInput_" on-change="pageNoCommitted"
aria-label$="$i18n{labelPageNumber}">
<span id="divider">/</span>
<span id="pagelength">[[docLength]]</span>
......@@ -151,6 +151,7 @@
on-click="onZoomOutClick_">
</cr-icon-button>
<input type="text" value="100%" on-input="onZoomInput_"
on-pointerup="onZoomInputPointerup_"
on-blur="onZoomInputBlur_">
</input>
<cr-icon-button iron-icon="pdf:add" title="$i18n{tooltipZoomIn}"
......
......@@ -308,6 +308,14 @@ export class ViewerPdfToolbarNewElement extends PolymerElement {
this.getZoomInput_().value = zoomString;
}
/**
* @param {!Event} e
* @private
*/
onZoomInputPointerup_(e) {
/* @type {!HTMLInputElement} */ (e.target).select();
}
/** @private */
onMoreClick_() {
const anchor =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment