Skip to content
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

fix: user-select style and pre-create iframe in embed.js #8093

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

cr-zhichen
Copy link
Contributor

@cr-zhichen cr-zhichen commented Sep 8, 2024

  • Fixes the user-select style: Prevents the iframe element itself from being selected by adding the 'user-select: none' property to the CSS style. This ensures that users cannot accidentally select or highlight the iframe element within the embedded content.

  • Pre-creates the iframe: Adds functionality to pre-create the iframe when embed.js loads. This resolves the issue where the first click to open the iframe results in a delay, improving performance and user experience by ensuring the iframe is ready in advance.

- **Fixes the user-select style**: Prevents text selection within the embedded content by adding the `'user-select: none'` property to the CSS style of the embedded content. This ensures that users cannot select or copy text inside the embedded content.

- **Pre-creates the iframe**: Adds functionality to pre-create the iframe when `embed.js` loads. This prevents any lag or delay when the user first clicks the button to open the iframe, improving the overall user experience.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. javascript 🐞 bug Something isn't working labels Sep 8, 2024
@crazywoola crazywoola changed the title fix: fix user-select style and pre-create iframe in embed.js fix: user-select style and pre-create iframe in embed.js Sep 9, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 9, 2024
@iamjoel iamjoel merged commit 551b33c into langgenius:main Sep 9, 2024
3 checks passed
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Sep 10, 2024
* commit 'dabfd74622a613c7198f06791ad70424ac94f54f': (222 commits)
  feat: Parallel Execution of Nodes in Workflows (langgenius#8192)
  docs: replace docker-compose with docker compose (langgenius#8195)
  refactor(api/core): Improve type hints and apply ruff formatter in agent runner and model manager. (langgenius#8166)
  filter excel empty sheet (langgenius#8194)
  fix: The length of the tag should between 1 and 50 (langgenius#8187) (langgenius#8188)
  nvidia rerank top n missed (langgenius#8185)
  fix: Version '2.6.2-2' for 'expat' was not found (langgenius#8182)
  code merge error (langgenius#8183)
  add volcengine tos storage (langgenius#8164)
  chore: bump super-linter to v7 (langgenius#8148)
  feat(api/core/model_runtime/entities/defaults.py): Add TOP_K in default parameters. (langgenius#8167)
  Fix variable typo (cont) (langgenius#8161)
  update qwen-long (langgenius#8157)
  Update LICENSE - remove 'SaaS' from restriction term definition (langgenius#8143)
  fix: html raw render (langgenius#8138)
  chore: translate i18n files (langgenius#8135)
  fix: user-select style and pre-create iframe in embed.js (langgenius#8093)
  Modify model parameters in Spark LLMs and zhipuai LLMs (langgenius#8078)
  chore: offline n to 1 retrieval (langgenius#8134)
  fix: ollama text embedding 500 error (langgenius#8131)
  ...

# Conflicts:
#	api/configs/app_config.py
#	api/configs/feature/__init__.py
#	api/core/helper/code_executor/code_executor.py
#	api/services/conversation_service.py
#	web/yarn.lock
lau-td pushed a commit to heydevs-io/dify that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants