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 isInputField #4271
Fix isInputField #4271
Conversation
Not sure about the tests btw, maybe that's a bit too much. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Also, I think the tests are fine.
What should I expect as the result of <div contenteditable><span></span></div> ...and called as: isInputField( document.querySelector( 'div > span' ) ); ? |
Since it’s not the input field itself, I guess false?
…On Thu, 4 Jan 2018 at 21:29, Andrew Duthie ***@***.***> wrote:
What should I expect as the result of isInputField given HTML:
<div contenteditable><span></span></div>
...and called as:
isInputField( document.querySelector( 'div > span' ) );
?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#4271 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEfg6wxaK20QGcwLbK6rPggLG79pWrEbks5tHTShgaJpZM4RSWVm>
.
|
Yeah, I guess the intention of the question is less "what would it return" (it returns Certainly an edge case, but one which I expect would be no fun to debug if it were encountered 😄 |
Hm, I would assume the person using |
Description
Fixes #4268. I accidentally checked for lower case names in
nodeName
. 🙈 Adds tests too.How Has This Been Tested?
Select a block, then select some text in an input field inside the block or in the inspector. The content of the section should be copied, not the whole block.
Checklist: