mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
fd7d34d3129b4e384956663e1b70b676df9499e6
Fixes https://github.com/webstudio-is/webstudio-builder/issues/1198 ## Description - Button has a standard behavior with space key pressed that can't be turned off, so we can't type a space - Even if we work around the space behavior somehow, we still don't have an ability for rich-text to accept any instance and that makes a use case for icon button and button with icon on left/right impossible The solution I went for is to make it container for accepting child instances and edit text using InnerText property. This may be not as intuitive as direct rich-text but its more capable. Webflow does the same thing for a form button, though it uses an input element. <img width="1082" alt="Screenshot 2023-03-09 at 03 10 05" src="https://user-images.githubusercontent.com/52824/223898596-a4aae718-32d6-4090-a6f9-3d883b587ef7.png"> ## Steps for reproduction 1. add button 1. change inner text 1. add image or text components ## Code Review - [ ] hi @TrySound , I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview - [ ] @taylornowotny - please test ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
Webstudio Builder
Webstudio Builder is a NoCode Visual Tool inspired by Webflow. It is the place where you can build your site or app visually.
Contributing
Don't hesitate to reach out of you have questions around contributing to the project.
Community
Languages
TypeScript
98.9%
PLpgSQL
0.5%
CSS
0.3%
Shell
0.2%
JavaScript
0.1%