fix(input): disable shadow-dom for text inputs (#17043)

fixes #17020
This commit is contained in:
Manu MA
2019-01-11 16:07:38 +01:00
committed by GitHub
parent 418052f84b
commit 63e0501ae6
10 changed files with 44 additions and 32 deletions

View File

@ -1,8 +1,8 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Method, Prop, State, Watch } from '@stencil/core';
import { Color, InputChangeEventDetail, Mode, StyleEventDetail, TextFieldTypes } from '../../interface';
import { debounceEvent, findItemLabel, renderHiddenInput } from '../../utils/helpers';
import { createColorClasses, hostContext } from '../../utils/theme';
import { debounceEvent, findItemLabel } from '../../utils/helpers';
import { createColorClasses } from '../../utils/theme';
@Component({
tag: 'ion-input',
@ -10,7 +10,7 @@ import { createColorClasses, hostContext } from '../../utils/theme';
ios: 'input.ios.scss',
md: 'input.md.scss'
},
shadow: true
scoped: true
})
export class Input implements ComponentInterface {
@ -319,7 +319,6 @@ export class Input implements ComponentInterface {
'aria-disabled': this.disabled ? 'true' : null,
class: {
...createColorClasses(this.color),
'in-item': hostContext('ion-item', this.el),
'has-value': this.hasValue(),
'has-focus': this.hasFocus
}
@ -328,8 +327,6 @@ export class Input implements ComponentInterface {
render() {
const value = this.getValue();
renderHiddenInput(false, this.el, this.name, value, this.disabled);
const labelId = this.inputId + '-lbl';
const label = findItemLabel(this.el);
if (label) {