Fl4m3Ph03n1x
Background
I havea live component that is basically a form with a couple of text inputs and a submit button.
I have the interface kinda looking the way I want, but there is a problem: I cannot input anything into the text input fields.
And I have no idea why.
Code
As you can see I have 2 text input fields.
My code is the following:
defmodule WebInterface.Live.Window.Main.Authenticate do
@moduledoc """
LiveView subcomponent for the Authenticate page as part of the Main subcomponent.
This subcomponent has the forms for the user's authentication.
"""
use WebInterface, :live_component
alias Elixir.Phoenix.LiveView.Rendered
@spec render(map) :: Rendered.t
def render(assigns) do
~H"""
<div class="header">
<h2>Description</h2>
<p><%= @selected_command.description %></p>
</div>
<div class="body">
<form>
<div class="intro">
<h3>Authentication</h3>
<p>Fill the Cookie and token. Lorem Ipsum.</p>
</div>
<label for="cookie">Cookie: </label>
<input type="text" id="cookie" name="cookie"/>
<label for="token">Token: </label>
<input type="text" id="token" name="token"/>
</form>
<button
phx-click="execute_command"
phx-value-command={@selected_command.id}
>
Save
</button>
</div>
"""
end
end
At first I thought this was happening because I was not using text_input, however, after replacing the <input type="text" id="cookie" name="cookie"/> with it, the same happens.
Questions
I am using here plain HTML for the most part. I know Phoenix has some helpers, but I am not sure on how I would even use them here, so I am staying away from it for now.
How can I fix this?
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Latest Phoenix Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
Can you be a bit more detailed? Do you see a cursor, does it flicker but reset, does it do nothing?
Fl4m3Ph03n1x
When I click it, nothing happens.
I would expect to see a
|inside of the text box when I click it, but this does not happen. Its like it is preventing the input.benwilson512
Do you see any errors in your browser console or phoenix console?
Fl4m3Ph03n1x
This is what happens. You can see I am fanatically clicking the text input boxes, but nothing happens.
phx-somethingin the form?No errors appear in the console either.
Fl4m3Ph03n1x
After some investigation I found the cause for the issue in my
assets\css\app.css:This piece of code (that shows and hides the forms) makes it so I can not type into them.
Why is this happening?
I also realize the native Phoenix css code has something similar in the same file:
Could there be a conflict?
Fl4m3Ph03n1x
After more experimentation, I found that if I stop using my css classes
hiddenandshowand instead usefade-outandfade-in(from Phoenix), the text inputs work.However, Because I am not removing the elements from the page, I am just left with huge blank spaces.
What so special about my classes that they mess Phoenix text inputs?
benwilson512
The browser has no idea these are from phoenix, these are regular text inputs not “phoenix” text inputs. I’m not sure about the interaction going on between the CSS and the DOM but this isn’t really specific to phoenix. I would make sure live view isn’t doing some sort of crazy rendering loop where it’s re-rendering rapidly or something and overloading the browser but as long as that isn’t happening this seems mostly just a core CSS / HTML question.