Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Shift+Return does not create a line break #16

Closed
JustYourBud opened this issue Feb 24, 2023 · 16 comments
Closed

Shift+Return does not create a line break #16

JustYourBud opened this issue Feb 24, 2023 · 16 comments
Labels
enhancement New feature or request

Comments

@JustYourBud
Copy link

I've only tried this extension on Firefox but when using shift+return to try and create a line break in a message, it stays on the same line.
I have my settings set to the recommended ones in the README, so I'm not sure where this issue is coming from. It's not a huge one but it makes sending something like a block of code relativity more difficult.

Images from Firefox and Edge respectively
image
image

@anaclumos
Copy link
Owner

I'll try to look into this. One question: Doesn't Bing eventually ignore all line breaks when submitting the prompt?

@JustYourBud
Copy link
Author

I'm not sure, I haven't been able to use it enough. The only scenario I could see where you'd want to use them a lot is, like I said, writing a quick snippet of code or something.
image

@JustYourBud
Copy link
Author

So after using it a bit more, the formatting does get lost once you send your message (or at the very least the code I sent was completely jumbled), thought I don't think Sydney seems to care--she still understands perfectly.

I do still think it would be a good thing to have, just for the sake of making sure everything is properly formatted in the input box beforehand, regardless of how the output displays. Personally speaking it just helps me make sure everything is correct before I send it to Bing, which is especially important right now when conversations are still so limited.

@anaclumos
Copy link
Owner

Ok. I'll look into the matter.

@anaclumos anaclumos added the enhancement New feature or request label Feb 26, 2023
@DovieW
Copy link

DovieW commented Mar 2, 2023

It seems to be working fine for me.

@fullerenedream
Copy link

I have this problem too. It's hard to read my own messages without being able to use line breaks.

@archont00
Copy link

The biggest issue is when I try to type (or even paste from plain text editor) a code block. It is pretty tough to read code without visible line breaks :-) On the other hand, it seems that line break characters are preserved as Bing happily translates the code to other programming language without errors. (I use Firefox, Ubuntu Linux.)

@github-actions
Copy link

github-actions bot commented May 3, 2023

This issue is stale because it has been open for 30 days with no activity.

@anaclumos
Copy link
Owner

image

So after some research, I found that Bing does register as \n, but it's Firefox's problem that it does not render as a line break. Any suggestions?

@github-actions github-actions bot removed the stale label May 9, 2023
@SpiralNuggets
Copy link

Can you do something like directly inject the line break into the prompt box?

@ngoclong19
Copy link

I think we could add a CSS rule white-space: pre-wrap; to the text area .text-input .text-area.

Currently, it is white-space: inherit;, and resolved to normal, which is affected by the following Firefox's bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1830555

@JustYourBud
Copy link
Author

JustYourBud commented May 11, 2023

I think it's worth noting that Bing has recently been updated to render line breaks in the user's message bubbles now, despite Firefox still not displaying it properly in the input. Doesn't really help with this issue in particular but I thought it was worth a mention that they are registered during and after being sent, even though not shown in the input box.

screenshot showing my message bubble with a line break visible

and lo and behold the text bubble actually does use white-space: pre-wrap as @ngoclong19 suggested the input box do
css code displaying the pre-wrap styling of the element

@anaclumos
Copy link
Owner

I think the message-composing area is crucial. However, the current Bing design employs a label, which makes it impossible to create a line break. Can you suggest any alternatives?

@ngoclong19
Copy link

As a workaround, I'm using this rule in uBlock Origin:
bing.com##.text-input .text-area:style(white-space: pre-wrap !important)

ảnh

I think we need a way to inject the above CSS style in to the page.

@anaclumos I think the label text is empty so what get rendered is only the textarea nested directly inside.
My understanding is that the data-input attribute of the label element isn't a standard attribute, so it purpose is to facilitate Bing internal working, and won't affect browser rendering.

@jcuenod
Copy link

jcuenod commented Jun 9, 2023

document.querySelector("cib-serp")
    .shadowRoot.querySelector("cib-action-bar")
    .shadowRoot.querySelector("#searchboxform label")
        .style.whiteSpace = "pre-wrap"

@anaclumos
Copy link
Owner

#119

@anaclumos anaclumos closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants