Comments (6)
More findings:
I see a diff with events data when using windows on-screen keyboard and emoji shortcut (winkey+.)
With on-screen keyboard when the issue appears:
With the emoji picker (win+.) when there is no issue:
from docusaurus-openapi.
Found the bug!
We are using encodeURIComponent
to convert to a URI in the api call, but encodeURIComponent
does not work with the unicode format '\uD83C' that the keyboard outputs insted of the emoji itself.
This can be found in https://github.com/cloud-annotations/docusaurus-openapi/blob/main/packages/docusaurus-theme-openapi/src/theme/ApiDemoPanel/buildPostmanRequest.ts
I can make a pull request fixing this
from docusaurus-openapi.
Was too quick, this is not a valid unicode, i need to keep debugging
from docusaurus-openapi.
Ok new insight, this is probebly related to onInput event.
It appears that when i type using onInput the emoji start as non-exitsting unicode like \uD83C then the input continues and completes it into the pizza emoji.
But our code tries to use encodeURIComponent
in this middle state where only partial emoji was registered by onInput
from docusaurus-openapi.
Confirmed using this textbox on github. I asked it to print to console the onInput event and from 1 emoji input using the keyboard i get 2 onInput events
Ok you learn something new everyday, those are UTF-16 Encoding for emoji
So i get that the onInput meets half an emoji from the UTF-16 emoji and sends it to encodeURIComponent which fails
Will PR today or tomorrow with a solution
from docusaurus-openapi.
Good find! Thanks for looking into this :)
from docusaurus-openapi.
Related Issues (20)
- Improve ability to customise theme HOT 7
- Fix for header auth persistence.
- Error: `Cannot mix different versions of joi schemas` when adding docusaurus-plugin-openapi.
- bug: hideable for sidebar is not fully supported HOT 1
- oneOf doesn't work HOT 1
- Add visual indicator for deprecated path parameter
- Add visual indicator for deprecated request/response body field
- Response schema marked as "Optional"
- Getting theme error while useing @docusaurus/preset-classic with docusaurus-plugin-openapi in plugins HOT 2
- Code examples tabs overflow in narrow browser windows
- Quick Overview failing HOT 1
- Support of readonly attributes HOT 1
- MDX content in params is displayed in form elements HOT 1
- embed generated API menu in an existing sidebar
- Mocking all the request/responses interactions
- Postman collection support
- Docusaurus 3.0 support HOT 4
- formatting issues in v0.7.0 HOT 3
- cURL highlighting issues on 0.7.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-openapi.