Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dataview): fix unexpected scrollbar and outline when using default textview #16691

Merged
merged 2 commits into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/component/toolbox/feature/DataView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import ExtensionAPI from '../../../core/ExtensionAPI';
import { addEventListener } from 'zrender/src/core/event';
import Axis from '../../../coord/Axis';
import Cartesian2D from '../../../coord/cartesian/Cartesian2D';
import { warn } from '../../../util/log';

/* global document */

Expand Down Expand Up @@ -363,7 +364,7 @@ class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> {
textarea.readOnly = model.get('readOnly');
const style = textarea.style;
// eslint-disable-next-line max-len
style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none';
style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none';
style.color = model.get('textColor');
style.borderColor = model.get('textareaBorderColor');
style.backgroundColor = model.get('textareaColor');
Expand Down Expand Up @@ -397,7 +398,7 @@ class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> {
|| (contentToOption != null && optionToContent == null)) {
if (__DEV__) {
// eslint-disable-next-line
console.warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.')
warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.')
}
close();
return;
Expand Down