Changeset 239420 in webkit
- Timestamp:
- Dec 19, 2018 7:56:27 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r239413 r239420 1 2018-12-19 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Canvas: the recording auto-capture input shouldn't start focused 4 https://bugs.webkit.org/show_bug.cgi?id=192454 5 6 Reviewed by Joseph Pecoraro. 7 8 * UserInterface/Views/CanvasOverviewContentView.js: 9 (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel): 10 (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged): 11 1 12 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
r238829 r239420 210 210 let label = frameCount === 1 ? WI.UIString("Record first %s frame") : WI.UIString("Record first %s frames"); 211 211 212 let active = document.activeElement === this._recordingAutoCaptureFrameCountInputElement; 212 213 let selectionStart = this._recordingAutoCaptureFrameCountInputElement.selectionStart; 213 214 let selectionEnd = this._recordingAutoCaptureFrameCountInputElement.selectionEnd; … … 222 223 this._recordingAutoCaptureNavigationItem.label = fragment; 223 224 224 this._recordingAutoCaptureFrameCountInputElement.selectionStart = selectionStart; 225 this._recordingAutoCaptureFrameCountInputElement.selectionEnd = selectionEnd; 226 this._recordingAutoCaptureFrameCountInputElement.direction = direction; 225 if (active) { 226 this._recordingAutoCaptureFrameCountInputElement.selectionStart = selectionStart; 227 this._recordingAutoCaptureFrameCountInputElement.selectionEnd = selectionEnd; 228 this._recordingAutoCaptureFrameCountInputElement.direction = direction; 229 } 227 230 } 228 231 … … 271 274 _handleCanvasRecordingAutoCaptureFrameCountChanged(event) 272 275 { 273 this._recordingAutoCaptureFrameCountInputElement.value = WI.settings.canvasRecordingAutoCaptureFrameCount.value; 276 // Only update the value if it is different to prevent mangling the selection. 277 if (parseInt(this._recordingAutoCaptureFrameCountInputElement.value) !== WI.settings.canvasRecordingAutoCaptureFrameCount.value) 278 this._recordingAutoCaptureFrameCountInputElement.value = WI.settings.canvasRecordingAutoCaptureFrameCount.value; 274 279 275 280 this._updateRecordingAutoCaptureCheckboxLabel(WI.settings.canvasRecordingAutoCaptureFrameCount.value);
Note: See TracChangeset
for help on using the changeset viewer.