8000 Change inner input elements from DIV to SPAN by rgchris · Pull Request #93 · hostilefork/replpad-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change inner input elements from DIV to SPAN #93

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.

8000 Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

rgchris
Copy link
Collaborator
@rgchris rgchris commented Feb 18, 2021

This affects how text is copied and pasted from various browsers with 'block' display properties inserting newline characters and 'table-cell' display properties inserting tabs. This does mean that the input DIV now adapts to the size of its content as attempts to specify width and height have an adverse effect.

The net effect of these changes is that copying any portion of a ReplPad session should no longer have extaneous characters.

This affects how text is copied and pasted from various browsers with 'block' display properties inserting newline characters and 'table-cell' display properties inserting tabs. This does mean that the input DIV now adapts to the size of its content as attempts to specify width and height have an adverse effect.

The net effect of these changes is that copying any portion of a ReplPad session should no longer have extaneous characters.
@rgchris
Copy link
Collaborator Author
rgchris commented Feb 18, 2021

May need to monitor that there's no issues with using a SPAN this way. I see this issue with making a SPAN content-editable, however I sense this may be primarily on account of it's default behaviour as display: inline and that changing that to display: inline-block should mitigate that issue. At the very least, it may be that a DIV would work just as well and that the copy functionality is more dependent on the display value.

@hostilefork hostilefork merged commit dd89339 into hostilefork:master Feb 18, 2021
@hostilefork
Copy link
Owner
hostilefork commented Feb 18, 2021

Great!!!

This has been the issue that has been annoying me the most about the ReplPad (and kind of a psychological block toward looking into optimizing anything else due to questioning if there was something wrong with the basic premise of how the whole thing is being done)

It seems that I'm not getting the right click menu with "paste" enabled any longer when I'm at the console prompt, however. I don't know how easy that is to see on the mac, but if you could try:

>> do <test-repl>

...and run through those tests, it shows some of what I'm shooting for. Seems to also have a problem right now in the jump-to-bottom where if I'm scrolled up and type the o in okay it will jump to the bottom... but then I type kay and enter and the scroll doesn't follow the new output. :-/ My ideal is that these fiddly ergonomics actually work because most consoles suck at this stuff.


Now that you have an up-to-the-minute familiarity, it would be ideal if you could comment on what the potential might be for embedding graphics or other elements, as we might think of "rich" answers fitting into the transcript.

Try:

 >> do <trello>

So I'd kind of want a second opinion on whether you look at the DOM structure and think "yes, this looks like a forward-thinking kind of model for a 'rich console' that could be embedded in lots of different kinds of pages" or if you spot something wonky.

I'd like to be able to have the panels for the console in very light frameworks like how it is done currently... or in heavier ones:

https://golden-layout.com/

@hostilefork
Copy link
Owner

The TEST-REPL points to the issue where BrianOtto had once tinkered at things to get the right click menu to have paste:

#37

So maybe something in there and your change are related to why it's not working now (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0