2016-06-16 12 views
0

매우 이상한 버그가 있습니다. MVC에서 두 편집기를 표시하는 페이지가 있고 두 편집기 모두에 대해 값이있는 모델이 전달됩니다. 다음 모델은 다음과 같습니다검도 편집기가 IE의 동일한 페이지에 대한 여러 요청 후에 응답하지 않습니다.

public class BulletinsModel 
    { 
     [AllowHtml] 
     [Display(Name = "Some Bulletin")] 
     public string SomeBulletin { get; set; } 

     [AllowHtml] 
     [Display(Name = "Other Bulletin")] 
     public string OtherBulletin { get; set; } 
    } 

난 후, 또한 정보를 업데이트 게시물을 몇 가지 자바 스크립트 코드이보기 모델을 받아 두 검도 editors.There에 매핑 뷰를 정의했다.

@model BulletinsModel 

<div id="settings"> 
    <div class="form-horizontal"> 
     <div class="form-group"> 
      @Html.LabelFor(m => m.SomeBulletin, new { @class = "col-md-6 text-left" }) 
      @(Html.Kendo().EditorFor(m => m.SomeBulletin).Encode(false).Name("Some_Bulletin")) 

      @Html.LabelFor(m => m.OtherBulletin, new { @class = "col-md-6 text-left" }) 
      @(Html.Kendo().EditorFor(m => m.OtherBulletin).Encode(false).Name("Other_Bulletin")) 
     </div>  
    </div> 
</div> 

(공상 아무것도) 다음 없기 때문에이 뷰를 렌더링 내 액션 메소드에 대한 나의 코드는 다음과 같습니다

그러나
[HttpGet] 
public PartialViewResult Index() 
{ 
    ViewBag.ActiveSectionName = "Bulletins"; 
    var bulletinModel = GetBulletinsModel(); 
    return PartialView("_Bulletins",bulletinModel);   
} 

, 내 문제는 그 시간, 편집자의 몇 색인 작업을 타격 후 반응이 없으므로 정보를 수정할 수 없습니다. 이 문제는 다른 브라우저에서이 문제를 재현하지 못했기 때문에 IE에서만 발생합니다.

편집 : 방금 ​​편집기가 고정되어 있습니다. 편집기의 내용을 편집하려면 도구 모음의 아무 옵션이나 클릭하여 다시 한 번 응답해야합니다. 왜 그런가요?

답변

0

IE에서이 게시물에 설명 된대로 문제가 발생했음을 알 수 있습니다 : Adding, removing, adding editor -> all editors on page become read only in IE. 문제는 편집기 내부의 iframe 때문입니다. 내 페이지에 Ajax 요청을로드하면서 작동하도록 요청하기 전에 다음 코드를 추가해야했다.

function unloadEditor($editor) { 
     if ($editor.length > 0) { 
      $editor.data('kendoEditor').wrapper.find("iframe").remove(); 
      $editor.data('kendoEditor').destroy(); 
     } 
    } 
    unloadEditor($('#myEditor'));