User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2) Build Identifier: 3.7a2pre Calls to document.execCommand('formatBlock', false, '<div>') returns true but nothing happens. No <div> element is inserted. Reproducible: Always
Created attachment 427316 [details] Testcase To reproduce: Open the attached file select some text and click the "Test <P> element" link. Everything works as expected. Refresh the page, select some text and click the "Test <DIV> element" link. Nothing happens.
Quote: "Virtually all block style tags can be used" https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla# Allthough it does not explicitly say that <DIV> elements are supported, I believe they qualify as reasonable block element to support. Otherwise the execCommand method should return false and not true.
Component: DOM: Core & HTML → Editor
QA Contact: general → editor
In Firefox 11.0, I get the following output: """ Select this text and wrap in in a block element using the links below... execCommand return value: true HTML after: <div> Select this text and wrap in in a block element using the links below... </div> """ So it seems like this has been fixed. Please reopen if you can still reproduce.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.