FastGPT icon indicating copy to clipboard operation
FastGPT copied to clipboard

External links cannot be loaded into the corresponding page (optimization item)

Open aaronuu opened this issue 2 years ago • 2 comments

例行检查

  • [x] 我已确认目前没有类似 issue
  • [x] 我已完整查看过项目 README,以及项目文档
  • [x] 我使用了自己的 key,并确认我的 key 是可正常使用的
  • [x] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

你的版本

  • [x] 私有部署版本

问题描述 使用外链形式(第三种,弹窗)加载机器人,当html代码中出现两个window.onload时,则会互相覆盖,导致出现bug,建议使用如下代码代替 document.body.onload = embedChatbot;

window.addEventListener('load', function() { embedChatbot(); }); 复现步骤

预期结果

相关截图

aaronuu avatar Jan 09 '24 06:01 aaronuu

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Routine inspection

  • [x] I have confirmed that there is no similar issue currently
  • [x] I have fully reviewed the project README, as well as project documentation
  • [x] I used my own key and confirmed that my key can be used normally
  • [x] I understand and am willing to follow up on this issue, assist in testing and provide feedback
  • [x] I understand and acknowledge the above content, and understand that project maintainers have limited energy. Issues that do not follow the rules may be ignored or closed directly

your version

  • [x] Private deployment version

Problem Description Use the external link form (the third type, pop-up window) to load the robot. When two window.onload appear in the html code, they will cover each other, causing bugs. It is recommended to use the following code instead of document.body.onload = embedChatbot;

window.addEventListener('load', function() { embedChatbot(); }); Steps to reproduce

expected outcome

Related screenshots

c121914yu avatar Jan 09 '24 06:01 c121914yu

确实是的。可以提个pr

c121914yu avatar Jan 10 '24 07:01 c121914yu

新版已经按这个方式进行修改。

c121914yu avatar Jan 17 '24 03:01 c121914yu