-
Notifications
You must be signed in to change notification settings - Fork 21
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
TextField throws error when used inside web component (and shadow dom) #313
Comments
Thanks for opening this issue. We'll see when we have the time to reproduce and fix it. Contributions (even a code sandbox or the like) welcome! |
@nikku this is by design:
To be shadow dom save event should not be passed to debounce function (because of setTimeout, the browser will retarget the event). A quick fix would be to pass e.target instead. Shall I create a pull request for this bug? |
Passed event.target instead of event as parameter to the debounce method.
Passed event.target instead of event as parameter to the debounce method.
Passed event.target instead of event as parameter to the debounce method. Closes #313
Cf. https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/CHANGELOG.md#570 deps: update to @bpmn-io/properties-panel@3.15.0 Cf. https://github.com/bpmn-io/properties-panel/blob/main/CHANGELOG.md#3140 Cf. https://github.com/bpmn-io/properties-panel/blob/main/CHANGELOG.md#3150 feat: capitalize `Camunda Form` ([bpmn-io/bpmn-jsproperties-panel#1005](https://github.com/bpmn-io/bpmn-jsproperties-panel/issues/1005)) feat(feel-editor): improve FEEL popup editor icon ([bpmn-io/properties-panel#310](bpmn-io/properties-panel#310)) feat(feel-editor): add contextual keyword completion in FEEL editor fix(feel-editor): correct parsing of nested lists fix(feel-editor): correct parsing of incomplete QuantifiedExpression fix(feel-editor): only allow legal Name start characters fix: prevent error inside web component ([bpmn-io/properties-panel#313](bpmn-io/properties-panel#313))
Cf. https://github.com/bpmn-io/bpmn-js-properties-panel/blob/main/CHANGELOG.md#570 deps: update to @bpmn-io/properties-panel@3.15.0 Cf. https://github.com/bpmn-io/properties-panel/blob/main/CHANGELOG.md#3140 Cf. https://github.com/bpmn-io/properties-panel/blob/main/CHANGELOG.md#3150 feat: capitalize `Camunda Form` ([bpmn-io/bpmn-jsproperties-panel#1005](https://github.com/bpmn-io/bpmn-jsproperties-panel/issues/1005)) feat(feel-editor): improve FEEL popup editor icon ([bpmn-io/properties-panel#310](bpmn-io/properties-panel#310)) feat(feel-editor): add contextual keyword completion in FEEL editor fix(feel-editor): correct parsing of nested lists fix(feel-editor): correct parsing of incomplete QuantifiedExpression fix(feel-editor): only allow legal Name start characters fix: prevent error inside web component ([bpmn-io/properties-panel#313](bpmn-io/properties-panel#313))
Describe the Bug
TextField (and TextArea) throws error when input changes and the properties panel resides inside a web component.
The scope changes from shadow dom (inside handleInput method instance) to dom (inside handleInputCallback debounce method instance).
Same goes for TextArea.
Checkbox, Select and FEEL editor work as expected.
Steps to Reproduce
Create web component with code inside:
And then change the name of the process.
Expected Behavior
Exception: TypeError: Cannot read properties of undefined (reading 'length')
Target here is the web component in the dom instead of the input in the shadow dom.
Inside this method e has the right context and e.target equals the input instance
Environment
The text was updated successfully, but these errors were encountered: