sp-dev-docs
sp-dev-docs copied to clipboard
EventReciever from OL element prevents the Bullet list after inserting hyperlink within the Text Editor in SharePoint Online Webpart
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [X] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- browser version - 124.0.6367.119
- SPFx version - latest
- Node.js version - 18.16.1
- etc
Describe the bug / error
When i try to insert a bullet list after inserting hyperlink in the text editor, an eventlistener of keydown prevents the bullet list to insert. The preventDefault function is called in the _handleKeyDown function based on a condition. Please check the screenshot below,
image
Steps to reproduce
- Create a Text Editor within the sharePoint online webpart.
- Insert some bullet points with texts.
- Now insert a hyperlink inside the Editor.
- Then again try to add more bullets to the previously inserted list.
Expected behavior
It should be able to insert the bullet list even after inserting links into the Editor.